-------------------------------------------------------------------------- Render object --------------------------------------------------------------------------
| 1197 | // Render object |
| 1198 | //-------------------------------------------------------------------------- |
| 1199 | void Explosion::prepBatchRender(SceneRenderState* state) |
| 1200 | { |
| 1201 | if ( !mExplosionInstance ) |
| 1202 | return; |
| 1203 | |
| 1204 | MatrixF proj = GFX->getProjectionMatrix(); |
| 1205 | RectI viewport = GFX->getViewport(); |
| 1206 | |
| 1207 | // Set up our TS render state here. |
| 1208 | TSRenderState rdata; |
| 1209 | rdata.setSceneState( state ); |
| 1210 | |
| 1211 | // We might have some forward lit materials |
| 1212 | // so pass down a query to gather lights. |
| 1213 | LightQuery query; |
| 1214 | query.init( getWorldSphere() ); |
| 1215 | rdata.setLightQuery( &query ); |
| 1216 | |
| 1217 | // render mesh |
| 1218 | GFX->pushWorldMatrix(); |
| 1219 | |
| 1220 | prepModelView( state ); |
| 1221 | |
| 1222 | mExplosionInstance->animate(); |
| 1223 | mExplosionInstance->render( rdata ); |
| 1224 | |
| 1225 | GFX->popWorldMatrix(); |
| 1226 | GFX->setProjectionMatrix( proj ); |
| 1227 | GFX->setViewport( viewport ); |
| 1228 | } |
| 1229 | |
| 1230 | void Explosion::submitLights( LightManager *lm, bool staticLighting ) |
| 1231 | { |
nothing calls this directly
no test coverage detected