terrain-zodiacs -- Changes made for rendering zodiacs on regular terrain.

This commit is contained in:
Marc Chapman 2017-07-26 22:10:56 +01:00
parent 4ab89f637e
commit 8a6ac1fb0f
6 changed files with 194 additions and 0 deletions

View file

@ -20,6 +20,11 @@
// IN THE SOFTWARE.
//-----------------------------------------------------------------------------
//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~//
// Arcane-FX for MIT Licensed Open Source version of Torque 3D from GarageGames
// Copyright (C) 2015 Faust Logic, Inc.
//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~//
#include "platform/platform.h"
#include "terrain/terrRender.h"
@ -45,6 +50,8 @@
#include "gfx/gfxDrawUtil.h"
#include "afx/arcaneFX.h"
#include "afx/ce/afxZodiacMgr.h"
#include "gfx/gfxTransformSaver.h"
#include "gfx/bitmap/gBitmap.h"
#include "gfx/bitmap/ddsFile.h"
@ -421,6 +428,7 @@ void TerrainBlock::_renderBlock( SceneRenderState *state )
if ( isColorDrawPass )
lm = LIGHTMGR;
bool has_zodiacs = afxZodiacMgr::doesBlockContainZodiacs(state, this);
for ( U32 i=0; i < renderCells.size(); i++ )
{
TerrCell *cell = renderCells[i];
@ -483,6 +491,8 @@ void TerrainBlock::_renderBlock( SceneRenderState *state )
inst->defaultKey = (U32)cell->getMaterials();
if (has_zodiacs)
afxZodiacMgr::renderTerrainZodiacs(state, this, cell);
// Submit it for rendering.
renderPass->addInst( inst );
}