Commit a9b64e9e authored by hybrid's avatar hybrid

Removed some consts from POD type return values. Added missing imlementations in SSkinMeshBuffer.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@1517 dfc29bdd-3216-0410-991c-e03cc46cb475
parent fd61d6dd
...@@ -238,7 +238,7 @@ namespace scene ...@@ -238,7 +238,7 @@ namespace scene
} }
//! get the current hardware mapping hint //! get the current hardware mapping hint
virtual const E_HARDWARE_MAPPING getHardwareMappingHint_Index() const virtual E_HARDWARE_MAPPING getHardwareMappingHint_Index() const
{ {
return MappingHint_Index; return MappingHint_Index;
} }
......
...@@ -166,7 +166,7 @@ namespace scene ...@@ -166,7 +166,7 @@ namespace scene
virtual E_HARDWARE_MAPPING getHardwareMappingHint_Vertex() const = 0; virtual E_HARDWARE_MAPPING getHardwareMappingHint_Vertex() const = 0;
//! get the current hardware mapping hint //! get the current hardware mapping hint
virtual const E_HARDWARE_MAPPING getHardwareMappingHint_Index() const = 0; virtual E_HARDWARE_MAPPING getHardwareMappingHint_Index() const = 0;
//! set the hardware mapping hint, for driver //! set the hardware mapping hint, for driver
virtual void setHardwareMappingHint( E_HARDWARE_MAPPING NewMappingHint, E_BUFFER_TYPE Buffer=EBT_VERTEX_AND_INDEX ) = 0; virtual void setHardwareMappingHint( E_HARDWARE_MAPPING NewMappingHint, E_BUFFER_TYPE Buffer=EBT_VERTEX_AND_INDEX ) = 0;
......
...@@ -19,7 +19,7 @@ namespace scene ...@@ -19,7 +19,7 @@ namespace scene
struct SSkinMeshBuffer : public IMeshBuffer struct SSkinMeshBuffer : public IMeshBuffer
{ {
//! Default constructor //! Default constructor
SSkinMeshBuffer(video::E_VERTEX_TYPE vt=video::EVT_STANDARD) : ChangedID_Vertex(1),ChangedID_Index(1),MappingHint(EHM_NEVER),VertexType(vt) SSkinMeshBuffer(video::E_VERTEX_TYPE vt=video::EVT_STANDARD) : ChangedID_Vertex(1),ChangedID_Index(1),MappingHint_Vertex(EHM_NEVER),MappingHint_Index(EHM_NEVER),VertexType(vt)
{ {
#ifdef _DEBUG #ifdef _DEBUG
setDebugName("SSkinMeshBuffer"); setDebugName("SSkinMeshBuffer");
...@@ -94,6 +94,10 @@ struct SSkinMeshBuffer : public IMeshBuffer ...@@ -94,6 +94,10 @@ struct SSkinMeshBuffer : public IMeshBuffer
} }
} }
//! Get type of index data which is stored in this meshbuffer.
/** \return Index type of this buffer. */
virtual video::E_INDEX_TYPE getIndexType() const { return video::EIT_16BIT; }
//! Get pointer to index array //! Get pointer to index array
virtual const u16* getIndices() const virtual const u16* getIndices() const
{ {
...@@ -316,16 +320,30 @@ struct SSkinMeshBuffer : public IMeshBuffer ...@@ -316,16 +320,30 @@ struct SSkinMeshBuffer : public IMeshBuffer
//! append the meshbuffer to the current buffer //! append the meshbuffer to the current buffer
virtual void append(const IMeshBuffer* const other) {} virtual void append(const IMeshBuffer* const other) {}
//! get the current hardware mapping hint //! get the current hardware mapping hint for vertex buffers
virtual E_HARDWARE_MAPPING getHardwareMappingHint() const virtual E_HARDWARE_MAPPING getHardwareMappingHint_Vertex() const
{
return MappingHint_Vertex;
}
//! get the current hardware mapping hint for index buffers
virtual E_HARDWARE_MAPPING getHardwareMappingHint_Index() const
{ {
return MappingHint; return MappingHint_Index;
} }
//! set the hardware mapping hint, for driver //! set the hardware mapping hint, for driver
virtual void setHardwareMappingHint( E_HARDWARE_MAPPING NewMappingHint ) virtual void setHardwareMappingHint( E_HARDWARE_MAPPING NewMappingHint, E_BUFFER_TYPE Buffer=EBT_VERTEX_AND_INDEX )
{ {
MappingHint=NewMappingHint; if (Buffer==EBT_VERTEX)
MappingHint_Vertex=NewMappingHint;
else if (Buffer==EBT_INDEX)
MappingHint_Index=NewMappingHint;
else if (Buffer==EBT_VERTEX_AND_INDEX)
{
MappingHint_Vertex=NewMappingHint;
MappingHint_Index=NewMappingHint;
}
} }
//! flags the mesh as changed, reloads hardware buffers //! flags the mesh as changed, reloads hardware buffers
...@@ -345,7 +363,8 @@ struct SSkinMeshBuffer : public IMeshBuffer ...@@ -345,7 +363,8 @@ struct SSkinMeshBuffer : public IMeshBuffer
u32 ChangedID_Index; u32 ChangedID_Index;
// hardware mapping hint // hardware mapping hint
E_HARDWARE_MAPPING MappingHint; E_HARDWARE_MAPPING MappingHint_Vertex;
E_HARDWARE_MAPPING MappingHint_Index;
//ISkinnedMesh::SJoint *AttachedJoint; //ISkinnedMesh::SJoint *AttachedJoint;
core::matrix4 Transformation; core::matrix4 Transformation;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment