| 2137 | } |
| 2138 | |
| 2139 | void Tr2Sprite2dScene::RunJobHelper( TriRenderJob* job ) |
| 2140 | { |
| 2141 | USE_MAIN_THREAD_RENDER_CONTEXT(); |
| 2142 | |
| 2143 | renderContext.m_esm.EndManagedRendering(); |
| 2144 | |
| 2145 | if( m_useLinearColorSpace ) |
| 2146 | { |
| 2147 | renderContext.SetRenderState( Tr2RenderContextEnum::RS_SRGBWRITEENABLE, 0 ); |
| 2148 | } |
| 2149 | |
| 2150 | // When rendering of this scene started, a NULL value was pushed |
| 2151 | // for depth/stencil buffer. Pop it here, to get whatever was |
| 2152 | // in use before back. The null value is pushed again after |
| 2153 | // the job has finished. |
| 2154 | renderContext.m_esm.PopDepthStencilBuffer(); |
| 2155 | |
| 2156 | renderContext.m_esm.PushRenderTarget( Tr2TextureAL(), 1 ); |
| 2157 | |
| 2158 | renderContext.m_esm.PushViewport(); |
| 2159 | job->Run( m_realTime, m_simTime ); |
| 2160 | renderContext.m_esm.PopViewport(); |
| 2161 | |
| 2162 | renderContext.m_esm.PopRenderTarget( 1 ); |
| 2163 | |
| 2164 | renderContext.m_esm.PushDepthStencilBuffer( Tr2TextureAL() ); |
| 2165 | |
| 2166 | renderContext.m_esm.BeginManagedRendering(); |
| 2167 | renderContext.m_esm.ApplyStandardStates( Tr2EffectStateManager::RM_SPRITE2D ); |
| 2168 | |
| 2169 | if( m_useLinearColorSpace ) |
| 2170 | { |
| 2171 | renderContext.SetRenderState( Tr2RenderContextEnum::RS_SRGBWRITEENABLE, 1 ); |
| 2172 | } |
| 2173 | |
| 2174 | renderContext.m_esm.ApplyVertexDeclaration( m_vertexDecl ); |
| 2175 | } |
| 2176 | |
| 2177 | void Tr2Sprite2dScene::ResetBufferPointers() |
| 2178 | { |
nothing calls this directly
no test coverage detected