Initial pass at implementing MaterialAsset macromagic utility functions and applies it to the renderMeshExample object as well as groundPlane

This commit is contained in:
Areloch 2020-12-27 23:24:29 -06:00
parent e9dba74891
commit c1cd217557
5 changed files with 131 additions and 113 deletions

View file

@ -33,6 +33,8 @@
#include "gfx/gfxPrimitiveBuffer.h"
#endif
#include "T3D/assets/MaterialAsset.h"
class BaseMatInstance;
@ -65,8 +67,8 @@ class RenderMeshExample : public SceneObject
//--------------------------------------------------------------------------
// Rendering variables
//--------------------------------------------------------------------------
// The name of the Material we will use for rendering
String mMaterialName;
DECLARE_MATERIALASSET(RenderMeshExample, Material, UpdateMask);
// The actual Material instance
BaseMatInstance* mMaterialInst;
@ -131,4 +133,4 @@ public:
void prepRenderImage( SceneRenderState *state );
};
#endif // _RENDERMESHEXAMPLE_H_
#endif // _RENDERMESHEXAMPLE_H_