Initial work to support transparent kart in ghost replay

This commit is contained in:
Benau 2016-04-02 12:55:20 +08:00
parent 34f9d507d0
commit 5ac25db7f8
2 changed files with 21 additions and 0 deletions

View File

@ -10,6 +10,15 @@ namespace irr
namespace video namespace video
{ {
//! Flag for karts in STK to use specific material
enum E_CUSTOM_MATERIAL_TYPE
{
ECMT_DEFAULT = 0,
ECMT_TRANSPARENT,
ECMT_RED,
ECMT_BLUE
};
//! Abstracted and easy to use fixed function/programmable pipeline material modes. //! Abstracted and easy to use fixed function/programmable pipeline material modes.
enum E_MATERIAL_TYPE enum E_MATERIAL_TYPE
{ {

View File

@ -23,6 +23,9 @@ namespace scene
class IMesh : public virtual IReferenceCounted class IMesh : public virtual IReferenceCounted
{ {
public: public:
IMesh() : cmt(video::ECMT_DEFAULT) {}
virtual ~IMesh() {}
//! Get the amount of mesh buffers. //! Get the amount of mesh buffers.
/** \return Amount of mesh buffers (IMeshBuffer) in this mesh. */ /** \return Amount of mesh buffers (IMeshBuffer) in this mesh. */
@ -66,6 +69,15 @@ namespace scene
indices have changed. Otherwise, changes won't be updated indices have changed. Otherwise, changes won't be updated
on the GPU in the next render cycle. */ on the GPU in the next render cycle. */
virtual void setDirty(E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX) = 0; virtual void setDirty(E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX) = 0;
//! Set the mesh to use custom material type (mainly karts in STK)
/** \param m New custom material type for the mesh. */
void setCustomMaterialType(video::E_CUSTOM_MATERIAL_TYPE m) { cmt = m; }
//! Get the mesh to use custom material type (mainly karts in STK)
video::E_CUSTOM_MATERIAL_TYPE getCustomMaterialType() const { return cmt; }
private:
video::E_CUSTOM_MATERIAL_TYPE cmt;
}; };
} // end namespace scene } // end namespace scene