mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-12 19:31:41 +00:00
cleaned up variant of https://github.com/GarageGames/Torque3D/pull/768 alterations: opengl support, in-shader bug-reporting, direction vector fit to material slider-bar.
This commit is contained in:
parent
949251b988
commit
c6cdfafe4e
42 changed files with 2680 additions and 8 deletions
|
|
@ -48,6 +48,7 @@
|
|||
#include "materials/materialFeatureData.h"
|
||||
#include "materials/materialFeatureTypes.h"
|
||||
#include "console/engineAPI.h"
|
||||
#include "T3D/accumulationVolume.h"
|
||||
|
||||
using namespace Torque;
|
||||
|
||||
|
|
@ -293,6 +294,13 @@ bool TSStatic::onAdd()
|
|||
|
||||
_updateShouldTick();
|
||||
|
||||
// Accumulation
|
||||
if ( isClientObject() && mShapeInstance )
|
||||
{
|
||||
if ( mShapeInstance->hasAccumulation() )
|
||||
AccumulationVolume::addObject(this);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -403,6 +411,13 @@ void TSStatic::onRemove()
|
|||
{
|
||||
SAFE_DELETE( mPhysicsRep );
|
||||
|
||||
// Accumulation
|
||||
if ( isClientObject() && mShapeInstance )
|
||||
{
|
||||
if ( mShapeInstance->hasAccumulation() )
|
||||
AccumulationVolume::removeObject(this);
|
||||
}
|
||||
|
||||
mConvexList->nukeList();
|
||||
|
||||
removeFromScene();
|
||||
|
|
@ -562,6 +577,9 @@ void TSStatic::prepRenderImage( SceneRenderState* state )
|
|||
rdata.setFadeOverride( 1.0f );
|
||||
rdata.setOriginSort( mUseOriginSort );
|
||||
|
||||
// Acculumation
|
||||
rdata.setAccuTex(mAccuTex);
|
||||
|
||||
// If we have submesh culling enabled then prepare
|
||||
// the object space frustum to pass to the shape.
|
||||
Frustum culler;
|
||||
|
|
@ -649,6 +667,13 @@ void TSStatic::setTransform(const MatrixF & mat)
|
|||
if ( mPhysicsRep )
|
||||
mPhysicsRep->setTransform( mat );
|
||||
|
||||
// Accumulation
|
||||
if ( isClientObject() && mShapeInstance )
|
||||
{
|
||||
if ( mShapeInstance->hasAccumulation() )
|
||||
AccumulationVolume::updateObject(this);
|
||||
}
|
||||
|
||||
// Since this is a static it's render transform changes 1
|
||||
// to 1 with it's collision transform... no interpolation.
|
||||
setRenderTransform(mat);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue