MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / renderScene

Method renderScene

Engine/source/scene/sceneManager.cpp:150–185  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

148//-----------------------------------------------------------------------------
149
150void SceneManager::renderScene( ScenePassType passType, U32 objectMask )
151{
152 SceneCameraState cameraState = SceneCameraState::fromGFX();
153
154 // Handle frustum locking.
155
156 const bool lockedFrustum = ( smLockDiffuseFrustum && passType == SPT_Diffuse );
157 if( lockedFrustum )
158 cameraState = smLockedDiffuseCamera;
159 else if( passType == SPT_Diffuse )
160 {
161 // Store the camera state so if we lock, this will become the
162 // locked state.
163 smLockedDiffuseCamera = cameraState;
164 }
165
166 // Create the render state.
167
168 SceneRenderState renderState( this, passType, cameraState );
169
170 // If we have locked the frustum, reset the view transform
171 // on the render pass which the render state has just set
172 // to the view matrix corresponding to the locked frustum. For
173 // rendering, however, we need the true view matrix from the
174 // GFX state.
175
176 if( lockedFrustum )
177 {
178 RenderPassManager* rpm = renderState.getRenderPass();
179 rpm->assignSharedXform( RenderPassManager::View, GFX->getWorldMatrix() );
180 }
181
182 // Render.
183
184 renderScene( &renderState, objectMask );
185}
186
187//-----------------------------------------------------------------------------
188

Callers 2

GameRenderWorldFunction · 0.45
renderFrameFunction · 0.45

Calls 15

makeFovPortFrustumFunction · 0.85
assignSharedXformMethod · 0.80
registerGlobalLightsMethod · 0.80
isDiffusePassMethod · 0.80
findZoneMethod · 0.80
setTargetValueMethod · 0.80
getSpecialLightMethod · 0.80
getCurrentRenderStyleMethod · 0.80
getFrustumMethod · 0.80
getStereoFovPortMethod · 0.80
activateStereoTargetMethod · 0.80

Tested by

no test coverage detected