mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-11 06:34:36 +00:00
code duplication prune. should aid in stability
This commit is contained in:
parent
10f2453cee
commit
98a079a797
123 changed files with 632 additions and 966 deletions
|
|
@ -59,7 +59,7 @@ RenderMeshExample::RenderMeshExample()
|
|||
// Set it as a "static" object that casts shadows
|
||||
mTypeMask |= StaticObjectType | StaticShapeObjectType;
|
||||
|
||||
INIT_MATERIALASSET(Material);
|
||||
INIT_ASSET(Material);
|
||||
}
|
||||
|
||||
RenderMeshExample::~RenderMeshExample()
|
||||
|
|
@ -143,7 +143,7 @@ U32 RenderMeshExample::packUpdate( NetConnection *conn, U32 mask, BitStream *str
|
|||
// Write out any of the updated editable properties
|
||||
if (stream->writeFlag(mask & UpdateMask))
|
||||
{
|
||||
PACK_MATERIALASSET(conn, Material);
|
||||
PACK_ASSET(conn, Material);
|
||||
}
|
||||
|
||||
return retMask;
|
||||
|
|
@ -164,7 +164,7 @@ void RenderMeshExample::unpackUpdate(NetConnection *conn, BitStream *stream)
|
|||
|
||||
if ( stream->readFlag() ) // UpdateMask
|
||||
{
|
||||
UNPACK_MATERIALASSET(conn, Material);
|
||||
UNPACK_ASSET(conn, Material);
|
||||
|
||||
if ( isProperlyAdded() )
|
||||
updateMaterial();
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ class RenderMeshExample : public SceneObject
|
|||
BaseMatInstance* mMaterialInst;
|
||||
|
||||
DECLARE_MATERIALASSET(RenderMeshExample, Material);
|
||||
DECLARE_MATERIALASSET_NET_SETGET(RenderMeshExample, Material, UpdateMask);
|
||||
DECLARE_ASSET_NET_SETGET(RenderMeshExample, Material, UpdateMask);
|
||||
|
||||
// The GFX vertex and primitive buffers
|
||||
GFXVertexBufferHandle< VertexType > mVertexBuffer;
|
||||
|
|
|
|||
|
|
@ -145,7 +145,7 @@ U32 RenderShapeExample::packUpdate( NetConnection *conn, U32 mask, BitStream *st
|
|||
// Write out any of the updated editable properties
|
||||
if ( stream->writeFlag( mask & UpdateMask ) )
|
||||
{
|
||||
PACK_SHAPEASSET(conn, Shape);
|
||||
PACK_ASSET(conn, Shape);
|
||||
|
||||
// Allow the server object a chance to handle a new shape
|
||||
createShape();
|
||||
|
|
@ -169,7 +169,7 @@ void RenderShapeExample::unpackUpdate(NetConnection *conn, BitStream *stream)
|
|||
|
||||
if ( stream->readFlag() ) // UpdateMask
|
||||
{
|
||||
UNPACK_SHAPEASSET(conn, Shape);
|
||||
UNPACK_ASSET(conn, Shape);
|
||||
|
||||
if ( isProperlyAdded() )
|
||||
createShape();
|
||||
|
|
@ -258,4 +258,4 @@ void RenderShapeExample::prepRenderImage( SceneRenderState *state )
|
|||
|
||||
// Allow the shape to submit the RenderInst(s) for itself
|
||||
mShapeInstance->render( rdata );
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ class RenderShapeExample : public SceneObject
|
|||
// Rendering variables
|
||||
//--------------------------------------------------------------------------
|
||||
DECLARE_SHAPEASSET(RenderShapeExample, Shape, onShapeChanged);
|
||||
DECLARE_SHAPEASSET_SETGET(RenderShapeExample, Shape);
|
||||
DECLARE_ASSET_SETGET(RenderShapeExample, Shape);
|
||||
|
||||
// The actual shape instance
|
||||
TSShapeInstance* mShapeInstance;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue