mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-24 09:03:48 +00:00
Initial pass at implementing MaterialAsset macromagic utility functions and applies it to the renderMeshExample object as well as groundPlane
This commit is contained in:
parent
e9dba74891
commit
c1cd217557
5 changed files with 131 additions and 113 deletions
|
|
@ -64,9 +64,6 @@ public:
|
|||
GroundPlane();
|
||||
virtual ~GroundPlane();
|
||||
|
||||
static bool _setMaterialAsset(void* obj, const char* index, const char* data);
|
||||
static bool _setMaterialName(void* obj, const char* index, const char* data);
|
||||
|
||||
virtual bool onAdd();
|
||||
virtual void onRemove();
|
||||
virtual U32 packUpdate( NetConnection* connection, U32 mask, BitStream* stream );
|
||||
|
|
@ -81,8 +78,6 @@ public:
|
|||
|
||||
static void initPersistFields();
|
||||
|
||||
bool setMaterialAsset(const StringTableEntry materialAssetId);
|
||||
|
||||
virtual void getUtilizedAssets(Vector<StringTableEntry>* usedAssetsList);
|
||||
|
||||
protected:
|
||||
|
|
@ -109,11 +104,9 @@ private:
|
|||
F32 mSquareSize; ///< World units per grid cell edge.
|
||||
F32 mScaleU; ///< Scale factor for U texture coordinates.
|
||||
F32 mScaleV; ///< Scale factor for V texture coordinates.
|
||||
String mMaterialName; ///< Object name of material to use.
|
||||
BaseMatInstance* mMaterial; ///< Instantiated material based on given material name.
|
||||
|
||||
AssetPtr<MaterialAsset> mMaterialAsset;
|
||||
StringTableEntry mMaterialAssetId;
|
||||
DECLARE_MATERIALASSET(GroundPlane, Material, -1);
|
||||
|
||||
PhysicsBody *mPhysicsRep;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue