mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-11 14:44:36 +00:00
Merge branch 'development' into defineconsolemethod
Conflicts: Engine/source/materials/materialDefinition.cpp
This commit is contained in:
commit
ae284a89ec
129 changed files with 3742 additions and 1038 deletions
|
|
@ -165,6 +165,9 @@ void TSMesh::innerRender( TSMaterialList *materials, const TSRenderState &rdata,
|
|||
MeshRenderInst *coreRI = renderPass->allocInst<MeshRenderInst>();
|
||||
coreRI->type = RenderPassManager::RIT_Mesh;
|
||||
|
||||
// Pass accumulation texture along.
|
||||
coreRI->accuTex = rdata.getAccuTex();
|
||||
|
||||
const MatrixF &objToWorld = GFX->getWorldMatrix();
|
||||
|
||||
// Sort by the center point or the bounds.
|
||||
|
|
@ -2428,7 +2431,7 @@ void TSMesh::_createVBIB( TSVertexBufferHandle &vb, GFXPrimitiveBufferHandle &pb
|
|||
pInfo.startIndex = draw.start;
|
||||
// Use the first index to determine which 16-bit address space we are operating in
|
||||
pInfo.startVertex = indices[draw.start] & 0xFFFF0000;
|
||||
pInfo.minIndex = pInfo.startVertex;
|
||||
pInfo.minIndex = 0; // minIndex are zero based index relative to startVertex. See @GFXDevice
|
||||
pInfo.numVertices = getMin((U32)0x10000, mNumVerts - pInfo.startVertex);
|
||||
break;
|
||||
|
||||
|
|
@ -2439,7 +2442,7 @@ void TSMesh::_createVBIB( TSVertexBufferHandle &vb, GFXPrimitiveBufferHandle &pb
|
|||
pInfo.startIndex = draw.start;
|
||||
// Use the first index to determine which 16-bit address space we are operating in
|
||||
pInfo.startVertex = indices[draw.start] & 0xFFFF0000;
|
||||
pInfo.minIndex = pInfo.startVertex;
|
||||
pInfo.minIndex = 0; // minIndex are zero based index relative to startVertex. See @GFXDevice
|
||||
pInfo.numVertices = getMin((U32)0x10000, mNumVerts - pInfo.startVertex);
|
||||
break;
|
||||
|
||||
|
|
|
|||
|
|
@ -33,7 +33,8 @@ TSRenderState::TSRenderState()
|
|||
mMaterialHint( NULL ),
|
||||
mCuller( NULL ),
|
||||
mLightQuery( NULL ),
|
||||
mUseOriginSort( false )
|
||||
mUseOriginSort( false ),
|
||||
mAccuTex( NULL )
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -27,7 +27,9 @@
|
|||
#include "math/mMatrix.h"
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef _GFXDEVICE_H_
|
||||
#include "gfx/gfxDevice.h"
|
||||
#endif
|
||||
|
||||
class SceneRenderState;
|
||||
class GFXCubemap;
|
||||
|
|
@ -103,8 +105,14 @@ protected:
|
|||
/// are forward lit and need lights.
|
||||
LightQuery *mLightQuery;
|
||||
|
||||
// The accumulation texture provided by an accumulation
|
||||
// volume. This is passed down per-object.
|
||||
GFXTextureObject* mAccuTex;
|
||||
|
||||
public:
|
||||
|
||||
|
||||
|
||||
TSRenderState();
|
||||
TSRenderState( const TSRenderState &state );
|
||||
|
||||
|
|
@ -147,6 +155,10 @@ public:
|
|||
void setLightQuery( LightQuery *query ) { mLightQuery = query; }
|
||||
LightQuery* getLightQuery() const { return mLightQuery; }
|
||||
|
||||
///@see mAccuTex
|
||||
void setAccuTex( GFXTextureObject* query ) { mAccuTex = query; }
|
||||
GFXTextureObject* getAccuTex() const { return mAccuTex; }
|
||||
|
||||
/// @}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -39,7 +39,6 @@
|
|||
#include "gfx/gfxDrawUtil.h"
|
||||
#include "core/module.h"
|
||||
|
||||
|
||||
MODULE_BEGIN( TSShapeInstance )
|
||||
|
||||
MODULE_INIT
|
||||
|
|
@ -783,3 +782,16 @@ void TSShapeInstance::prepCollision()
|
|||
}
|
||||
}
|
||||
|
||||
// Returns true is the shape contains any materials with accumulation enabled.
|
||||
bool TSShapeInstance::hasAccumulation()
|
||||
{
|
||||
bool result = false;
|
||||
for ( U32 i = 0; i < mMaterialList->size(); ++i )
|
||||
{
|
||||
BaseMatInstance* mat = mMaterialList->getMaterialInst(i);
|
||||
if ( mat->hasAccumulation() )
|
||||
result = true;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -671,6 +671,12 @@ protected:
|
|||
void *mData; ///< available for use by app...initialized to 0
|
||||
|
||||
void prepCollision();
|
||||
|
||||
//-------------------------------------------------------------------------------------
|
||||
// accumulation
|
||||
//-------------------------------------------------------------------------------------
|
||||
|
||||
bool hasAccumulation();
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue