From 19092c368a8e9bae4e27e01f6efc2e24dff31976 Mon Sep 17 00:00:00 2001 From: Marc Chapman Date: Thu, 27 Jul 2017 01:15:57 +0100 Subject: [PATCH] localRenderViz -- Implements per-light renderViz setting. --- Engine/source/T3D/lightBase.cpp | 8 +++++++- Engine/source/T3D/lightBase.h | 7 +++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/Engine/source/T3D/lightBase.cpp b/Engine/source/T3D/lightBase.cpp index 76c0298c0..6cc739ed3 100644 --- a/Engine/source/T3D/lightBase.cpp +++ b/Engine/source/T3D/lightBase.cpp @@ -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 "T3D/lightBase.h" @@ -73,6 +78,7 @@ LightBase::LightBase() mLight = LightManager::createLightInfo(); mFlareState.clear(); + mLocalRenderViz = false; } LightBase::~LightBase() @@ -206,7 +212,7 @@ void LightBase::prepRenderImage( SceneRenderState *state ) // If the light is selected or light visualization // is enabled then register the callback. - if ( smRenderViz || isSelectedInEditor ) + if ( mLocalRenderViz || smRenderViz || isSelectedInEditor ) { ObjectRenderInst *ri = state->getRenderPass()->allocInst(); ri->renderDelegate.bind( this, &LightBase::_onRenderViz ); diff --git a/Engine/source/T3D/lightBase.h b/Engine/source/T3D/lightBase.h index af2c35071..bdaf38b15 100644 --- a/Engine/source/T3D/lightBase.h +++ b/Engine/source/T3D/lightBase.h @@ -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. +//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~// + #ifndef _LIGHTBASE_H_ #define _LIGHTBASE_H_ @@ -132,6 +137,8 @@ public: virtual void pauseAnimation( void ); virtual void playAnimation( void ); virtual void playAnimation( LightAnimData *animData ); +protected: + bool mLocalRenderViz; }; #endif // _LIGHTBASE_H_