Implemented registration of probes to avoid rendering all probes when unneeded.

This commit is contained in:
Areloch 2018-11-19 01:18:09 -06:00
parent ecd47830ca
commit c4a4fe5304
5 changed files with 26 additions and 3 deletions

View file

@ -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();

View file

@ -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;