Commit e80e76c7 authored by hybrid's avatar hybrid

Fixed line endings and a little bug in the if check.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@1404 dfc29bdd-3216-0410-991c-e03cc46cb475
parent e903f2ca
...@@ -223,23 +223,23 @@ namespace scene ...@@ -223,23 +223,23 @@ namespace scene
} }
//! flags the mesh as changed, reloads hardware buffers //! flags the mesh as changed, reloads hardware buffers
virtual void setDirty(E_BUFFER_TYPE Buffer=EBT_VERTEX_AND_INDEX) virtual void setDirty(E_BUFFER_TYPE Buffer=EBT_VERTEX_AND_INDEX)
{ {
if (Buffer==EBT_VERTEX_AND_INDEX ||Buffer==EBT_VERTEX) if (Buffer==EBT_VERTEX_AND_INDEX ||Buffer==EBT_VERTEX)
ChangedID_Vertex++; ++ChangedID_Vertex;
else if (Buffer==EBT_VERTEX_AND_INDEX || Buffer==EBT_INDEX) if (Buffer==EBT_VERTEX_AND_INDEX || Buffer==EBT_INDEX)
ChangedID_Index++; ++ChangedID_Index;
} }
//! Get the currently used ID for identification of changes. //! Get the currently used ID for identification of changes.
/** This shouldn't be used for anything outside the VideoDriver. */
virtual const u32 getChangedID_Vertex() const {return ChangedID_Vertex;}
//! Get the currently used ID for identification of changes.
/** This shouldn't be used for anything outside the VideoDriver. */ /** This shouldn't be used for anything outside the VideoDriver. */
virtual const u32 getChangedID_Vertex() const {return ChangedID_Vertex;}
//! Get the currently used ID for identification of changes.
/** This shouldn't be used for anything outside the VideoDriver. */
virtual const u32 getChangedID_Index() const {return ChangedID_Index;} virtual const u32 getChangedID_Index() const {return ChangedID_Index;}
u32 ChangedID_Vertex; u32 ChangedID_Vertex;
u32 ChangedID_Index; u32 ChangedID_Index;
//! hardware mapping hint //! hardware mapping hint
......
...@@ -69,9 +69,6 @@ namespace scene ...@@ -69,9 +69,6 @@ namespace scene
{ {
public: public:
//! Destructor
virtual ~IMeshBuffer() { }
//! Get the material of this meshbuffer //! Get the material of this meshbuffer
/** \return Material of this buffer. */ /** \return Material of this buffer. */
virtual video::SMaterial& getMaterial() = 0; virtual video::SMaterial& getMaterial() = 0;
...@@ -154,17 +151,16 @@ namespace scene ...@@ -154,17 +151,16 @@ namespace scene
virtual void setHardwareMappingHint( E_HARDWARE_MAPPING NewMappingHint ) = 0; virtual void setHardwareMappingHint( E_HARDWARE_MAPPING NewMappingHint ) = 0;
//! flags the meshbuffer as changed, reloads hardware buffers //! flags the meshbuffer as changed, reloads hardware buffers
virtual void setDirty(E_BUFFER_TYPE Buffer=EBT_VERTEX_AND_INDEX) = 0; virtual void setDirty(E_BUFFER_TYPE Buffer=EBT_VERTEX_AND_INDEX) = 0;
//to be spit into vertex and index buffers: //to be spit into vertex and index buffers:
//! Get the currently used ID for identification of changes. //! Get the currently used ID for identification of changes.
/** This shouldn't be used for anything outside the VideoDriver. */
virtual const u32 getChangedID_Vertex() const = 0;
//! Get the currently used ID for identification of changes.
/** This shouldn't be used for anything outside the VideoDriver. */ /** This shouldn't be used for anything outside the VideoDriver. */
virtual const u32 getChangedID_Vertex() const = 0; virtual const u32 getChangedID_Index() const = 0;
//! Get the currently used ID for identification of changes.
/** This shouldn't be used for anything outside the VideoDriver. */
virtual const u32 getChangedID_Index() const = 0;
u32 HardwareHint; u32 HardwareHint;
}; };
......
...@@ -140,30 +140,29 @@ namespace scene ...@@ -140,30 +140,29 @@ namespace scene
{ {
MappingHint=NewMappingHint; MappingHint=NewMappingHint;
} }
//! flags the mesh as changed, reloads hardware buffers
//! flags the mesh as changed, reloads hardware buffers virtual void setDirty(E_BUFFER_TYPE Buffer=EBT_VERTEX_AND_INDEX)
virtual void setDirty(E_BUFFER_TYPE Buffer=EBT_VERTEX_AND_INDEX) {
{ if (E_BUFFER_TYPE Buffer==EBT_VERTEX_AND_INDEX || E_BUFFER_TYPE Buffer==EBT_VERTEX)
if (E_BUFFER_TYPE Buffer==EBT_VERTEX_AND_INDEX || E_BUFFER_TYPE Buffer==EBT_VERTEX) ++ChangedID_Vertex;
ChangedID_Vertex++; if (E_BUFFER_TYPE Buffer==EBT_VERTEX_AND_INDEX || E_BUFFER_TYPE Buffer==EBT_INDEX)
else if (E_BUFFER_TYPE Buffer==EBT_VERTEX_AND_INDEX || E_BUFFER_TYPE Buffer==EBT_INDEX) ++ChangedID_Index;
ChangedID_Index++; }
}
//! Get the currently used ID for identification of changes. //! Get the currently used ID for identification of changes.
/** This shouldn't be used for anything outside the VideoDriver. */ /** This shouldn't be used for anything outside the VideoDriver. */
virtual const u32 getChangedID_Vertex() const {return ChangedID_Vertex;} virtual const u32 getChangedID_Vertex() const {return ChangedID_Vertex;}
//! Get the currently used ID for identification of changes. //! Get the currently used ID for identification of changes.
/** This shouldn't be used for anything outside the VideoDriver. */ /** This shouldn't be used for anything outside the VideoDriver. */
virtual const u32 getChangedID_Index() const {return ChangedID_Index;} virtual const u32 getChangedID_Index() const {return ChangedID_Index;}
//! ID used for hardware buffer management //! ID used for hardware buffer management
u32 ChangedID_Vertex; u32 ChangedID_Vertex;
//! ID used for hardware buffer management //! ID used for hardware buffer management
u32 ChangedID_Index; u32 ChangedID_Index;
//! Material of this meshBuffer //! Material of this meshBuffer
video::SMaterial Material; video::SMaterial Material;
......
...@@ -281,48 +281,43 @@ struct SSkinMeshBuffer : public IMeshBuffer ...@@ -281,48 +281,43 @@ struct SSkinMeshBuffer : public IMeshBuffer
return Vertices_Standard[i].Normal; return Vertices_Standard[i].Normal;
} }
} }
//! append the vertices and indices to the current buffer //! append the vertices and indices to the current buffer
virtual void append(const void* const vertices, u32 numVertices, const u16* const indices, u32 numIndices) {} virtual void append(const void* const vertices, u32 numVertices, const u16* const indices, u32 numIndices) {}
//! 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
virtual const E_HARDWARE_MAPPING getHardwareMappingHint() const
//! get the current hardware mapping hint {
virtual const E_HARDWARE_MAPPING getHardwareMappingHint() const return MappingHint;
{ }
return MappingHint;
} //! set the hardware mapping hint, for driver
virtual void setHardwareMappingHint( E_HARDWARE_MAPPING NewMappingHint )
//! set the hardware mapping hint, for driver {
virtual void setHardwareMappingHint( E_HARDWARE_MAPPING NewMappingHint ) MappingHint=NewMappingHint;
{ }
MappingHint=NewMappingHint;
}
//! flags the mesh as changed, reloads hardware buffers //! flags the mesh as changed, reloads hardware buffers
virtual void setDirty(E_BUFFER_TYPE Buffer=EBT_VERTEX_AND_INDEX) virtual void setDirty(E_BUFFER_TYPE Buffer=EBT_VERTEX_AND_INDEX)
{ {
if (Buffer==EBT_VERTEX_AND_INDEX ||Buffer==EBT_VERTEX) if (Buffer==EBT_VERTEX_AND_INDEX || Buffer==EBT_VERTEX)
ChangedID_Vertex++; ++ChangedID_Vertex;
else if (Buffer==EBT_VERTEX_AND_INDEX || Buffer==EBT_INDEX) if (Buffer==EBT_VERTEX_AND_INDEX || Buffer==EBT_INDEX)
ChangedID_Index++; ++ChangedID_Index;
} }
virtual const u32 getChangedID_Vertex() const {return ChangedID_Vertex;} virtual const u32 getChangedID_Vertex() const {return ChangedID_Vertex;}
virtual const u32 getChangedID_Index() const {return ChangedID_Index;} virtual const u32 getChangedID_Index() const {return ChangedID_Index;}
u32 ChangedID_Vertex; u32 ChangedID_Vertex;
u32 ChangedID_Index; u32 ChangedID_Index;
// hardware mapping hint
// hardware mapping hint E_HARDWARE_MAPPING MappingHint;
E_HARDWARE_MAPPING MappingHint;
//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