MCPcopy Create free account
hub / github.com/GarageGames/Torque3D / render

Method render

Engine/source/lighting/shadowMap/lightShadowMap.cpp:307–337  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

305}
306
307void LightShadowMap::render(RenderPassManager* renderPass,
308 const SceneRenderState *diffuseState,
309 bool _dynamic, bool _forceUpdate)
310{
311 if (!_forceUpdate)
312 {
313 // control how often shadow maps are refreshed
314 if (!_dynamic && (mStaticRefreshTimer->getElapsedMs() < getLightInfo()->getStaticRefreshFreq()))
315 return;
316 }
317 mStaticRefreshTimer->reset();
318
319 /* TODO: find out why this is causing issue with translucent objects
320 if (_dynamic && (mDynamicRefreshTimer->getElapsedMs() < getLightInfo()->getDynamicRefreshFreq()))
321 return;
322 mDynamicRefreshTimer->reset();
323 */
324
325 mDebugTarget.setTexture( NULL );
326 _render( renderPass, diffuseState );
327 mDebugTarget.setTexture( mShadowMapTex );
328
329 // Add it to the used list unless we're been updated.
330 if ( !mLastUpdate )
331 {
332 AssertFatal( !smUsedShadowMaps.contains( this ), "LightShadowMap::render - Used shadow map inserted twice!" );
333 smUsedShadowMaps.push_back( this );
334 }
335
336 mLastUpdate = Sim::getCurrentTime();
337}
338
339BaseMatInstance* LightShadowMap::getShadowMaterial( BaseMatInstance *inMat ) const
340{

Callers

nothing calls this directly

Calls 7

getStaticRefreshFreqMethod · 0.80
getCurrentTimeFunction · 0.50
getElapsedMsMethod · 0.45
resetMethod · 0.45
setTextureMethod · 0.45
containsMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected