mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-08 23:10:36 +00:00
Implemented registration of probes to avoid rendering all probes when unneeded.
This commit is contained in:
parent
ecd47830ca
commit
c4a4fe5304
5 changed files with 26 additions and 3 deletions
|
|
@ -201,6 +201,15 @@ ProbeRenderInst* ProbeManager::createProbeInfo(ProbeRenderInst* probe /* = NULL
|
|||
return outProbe;
|
||||
}
|
||||
|
||||
void ProbeManager::registerProbe(U32 probeIdx)
|
||||
{
|
||||
//Mostly for consolidation, but also lets us sanity check or prep any other data we need for rendering this in one place at time of flagging for render
|
||||
if (probeIdx >= ProbeRenderInst::all.size())
|
||||
return;
|
||||
|
||||
mRegisteredProbes.push_back_unique(probeIdx);
|
||||
}
|
||||
|
||||
/*void ProbeManager::initLightFields()
|
||||
{
|
||||
ProbeManagerMap &ProbeManagers = _getProbeManagers();
|
||||
|
|
|
|||
|
|
@ -277,6 +277,8 @@ public:
|
|||
SpecialProbeTypesCount
|
||||
};
|
||||
|
||||
Vector<U32> mRegisteredProbes;
|
||||
|
||||
ProbeManager();
|
||||
|
||||
~ProbeManager();
|
||||
|
|
@ -284,6 +286,8 @@ public:
|
|||
///
|
||||
static ProbeRenderInst* createProbeInfo(ProbeRenderInst* light = NULL);
|
||||
|
||||
void registerProbe(U32 probeIdx);
|
||||
|
||||
/// The light manager activation signal.
|
||||
static Signal<void(const char*,bool)> smActivateSignal;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue