Phase 2: #ifdef for Zodiacs and particles

This commit is contained in:
Marc Chapman 2018-01-23 22:03:18 +00:00
parent 1c2effd7fa
commit af62b5c0a9
7 changed files with 38 additions and 13 deletions

View file

@ -52,8 +52,9 @@
#ifdef TORQUE_AFX_ENABLED
#include "afx/arcaneFX.h"
#endif
#include "afx/ce/afxZodiacMgr.h"
#endif
#include "gfx/gfxTransformSaver.h"
#include "gfx/bitmap/gBitmap.h"
#include "gfx/bitmap/ddsFile.h"
@ -430,7 +431,9 @@ void TerrainBlock::_renderBlock( SceneRenderState *state )
if ( isColorDrawPass )
lm = LIGHTMGR;
#ifdef TORQUE_AFX_ENABLED
bool has_zodiacs = afxZodiacMgr::doesBlockContainZodiacs(state, this);
#endif
for ( U32 i=0; i < renderCells.size(); i++ )
{
TerrCell *cell = renderCells[i];
@ -492,10 +495,11 @@ void TerrainBlock::_renderBlock( SceneRenderState *state )
}
inst->defaultKey = (U32)cell->getMaterials();
#ifdef TORQUE_AFX_ENABLED
if (has_zodiacs)
afxZodiacMgr::renderTerrainZodiacs(state, this, cell);
// Submit it for rendering.
#endif
renderPass->addInst( inst );
}