mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-12 15:14:35 +00:00
localRenderViz -- Implements per-light renderViz setting.
This commit is contained in:
parent
a7c7b67c85
commit
19092c368a
2 changed files with 14 additions and 1 deletions
|
|
@ -20,6 +20,11 @@
|
||||||
// IN THE SOFTWARE.
|
// 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 "platform/platform.h"
|
||||||
#include "T3D/lightBase.h"
|
#include "T3D/lightBase.h"
|
||||||
|
|
||||||
|
|
@ -73,6 +78,7 @@ LightBase::LightBase()
|
||||||
mLight = LightManager::createLightInfo();
|
mLight = LightManager::createLightInfo();
|
||||||
|
|
||||||
mFlareState.clear();
|
mFlareState.clear();
|
||||||
|
mLocalRenderViz = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
LightBase::~LightBase()
|
LightBase::~LightBase()
|
||||||
|
|
@ -206,7 +212,7 @@ void LightBase::prepRenderImage( SceneRenderState *state )
|
||||||
|
|
||||||
// If the light is selected or light visualization
|
// If the light is selected or light visualization
|
||||||
// is enabled then register the callback.
|
// is enabled then register the callback.
|
||||||
if ( smRenderViz || isSelectedInEditor )
|
if ( mLocalRenderViz || smRenderViz || isSelectedInEditor )
|
||||||
{
|
{
|
||||||
ObjectRenderInst *ri = state->getRenderPass()->allocInst<ObjectRenderInst>();
|
ObjectRenderInst *ri = state->getRenderPass()->allocInst<ObjectRenderInst>();
|
||||||
ri->renderDelegate.bind( this, &LightBase::_onRenderViz );
|
ri->renderDelegate.bind( this, &LightBase::_onRenderViz );
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,11 @@
|
||||||
// IN THE SOFTWARE.
|
// IN THE SOFTWARE.
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~//
|
||||||
|
// Arcane-FX for MIT Licensed Open Source version of Torque 3D from GarageGames
|
||||||
|
// Copyright (C) 2015 Faust Logic, Inc.
|
||||||
|
//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~//
|
||||||
|
|
||||||
#ifndef _LIGHTBASE_H_
|
#ifndef _LIGHTBASE_H_
|
||||||
#define _LIGHTBASE_H_
|
#define _LIGHTBASE_H_
|
||||||
|
|
||||||
|
|
@ -132,6 +137,8 @@ public:
|
||||||
virtual void pauseAnimation( void );
|
virtual void pauseAnimation( void );
|
||||||
virtual void playAnimation( void );
|
virtual void playAnimation( void );
|
||||||
virtual void playAnimation( LightAnimData *animData );
|
virtual void playAnimation( LightAnimData *animData );
|
||||||
|
protected:
|
||||||
|
bool mLocalRenderViz;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // _LIGHTBASE_H_
|
#endif // _LIGHTBASE_H_
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue