mirror of
https://github.com/minetest/irrlicht.git
synced 2025-06-30 23:30:27 +02:00
API BREAKER: Replacing defines in irrTypes.h which are conflicting with c++ reserved identifier rules.
C++ has undefined behavior for identifiers starting with __ or with _ followed by an uppercase letter. We still have many more (in IrrCompileConfig.h and in all header-guards), will likely replace those later as well. As a workaround for users which might use irrlicht defines in their code, I've added the header irrLegacyDefines.h Including that allows to continue using old defines for a while - or make it easier to have code which compiles with old and new Irrlicht library versions. git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6251 dfc29bdd-3216-0410-991c-e03cc46cb475
This commit is contained in:
@ -26,23 +26,23 @@ namespace scene
|
||||
|
||||
//! Get the material of this meshbuffer
|
||||
/** \return Material of this buffer. */
|
||||
virtual video::SMaterial& getMaterial() _IRR_OVERRIDE_ =0;
|
||||
virtual video::SMaterial& getMaterial() IRR_OVERRIDE =0;
|
||||
|
||||
//! Get the material of this meshbuffer
|
||||
/** \return Material of this buffer. */
|
||||
virtual const video::SMaterial& getMaterial() const _IRR_OVERRIDE_ =0;
|
||||
virtual const video::SMaterial& getMaterial() const IRR_OVERRIDE =0;
|
||||
|
||||
//! Get the axis aligned bounding box of this meshbuffer.
|
||||
/** \return Axis aligned bounding box of this buffer. */
|
||||
virtual const core::aabbox3df& getBoundingBox() const _IRR_OVERRIDE_ =0;
|
||||
virtual const core::aabbox3df& getBoundingBox() const IRR_OVERRIDE =0;
|
||||
|
||||
//! Set axis aligned bounding box
|
||||
/** \param box User defined axis aligned bounding box to use
|
||||
for this buffer. */
|
||||
virtual void setBoundingBox(const core::aabbox3df& box) _IRR_OVERRIDE_ =0;
|
||||
virtual void setBoundingBox(const core::aabbox3df& box) IRR_OVERRIDE =0;
|
||||
|
||||
//! Recalculates the bounding box. Should be called if the mesh changed.
|
||||
virtual void recalculateBoundingBox() _IRR_OVERRIDE_ =0;
|
||||
virtual void recalculateBoundingBox() IRR_OVERRIDE =0;
|
||||
|
||||
//! Append the vertices and indices to the current buffer
|
||||
/** Only works for compatible vertex types.
|
||||
@ -50,7 +50,7 @@ namespace scene
|
||||
\param numVertices Number of vertices in the array.
|
||||
\param indices Pointer to index array.
|
||||
\param numIndices Number of indices in array. */
|
||||
virtual void append(const void* const vertices, u32 numVertices, const u16* const indices, u32 numIndices) _IRR_OVERRIDE_
|
||||
virtual void append(const void* const vertices, u32 numVertices, const u16* const indices, u32 numIndices) IRR_OVERRIDE
|
||||
{
|
||||
|
||||
}
|
||||
@ -58,7 +58,7 @@ namespace scene
|
||||
//! Append the meshbuffer to the current buffer
|
||||
/** Only works for compatible vertex types
|
||||
\param other Buffer to append to this one. */
|
||||
virtual void append(const IMeshBuffer* const other) _IRR_OVERRIDE_
|
||||
virtual void append(const IMeshBuffer* const other) IRR_OVERRIDE
|
||||
{
|
||||
|
||||
}
|
||||
@ -66,19 +66,19 @@ namespace scene
|
||||
// ------------------- To be removed? ------------------- //
|
||||
|
||||
//! get the current hardware mapping hint
|
||||
virtual E_HARDWARE_MAPPING getHardwareMappingHint_Vertex() const _IRR_OVERRIDE_
|
||||
virtual E_HARDWARE_MAPPING getHardwareMappingHint_Vertex() const IRR_OVERRIDE
|
||||
{
|
||||
return getVertexBuffer().getHardwareMappingHint();
|
||||
}
|
||||
|
||||
//! get the current hardware mapping hint
|
||||
virtual E_HARDWARE_MAPPING getHardwareMappingHint_Index() const _IRR_OVERRIDE_
|
||||
virtual E_HARDWARE_MAPPING getHardwareMappingHint_Index() const IRR_OVERRIDE
|
||||
{
|
||||
return getIndexBuffer().getHardwareMappingHint();
|
||||
}
|
||||
|
||||
//! set the hardware mapping hint, for driver
|
||||
virtual void setHardwareMappingHint( E_HARDWARE_MAPPING NewMappingHint, E_BUFFER_TYPE Buffer=EBT_VERTEX_AND_INDEX ) _IRR_OVERRIDE_
|
||||
virtual void setHardwareMappingHint( E_HARDWARE_MAPPING NewMappingHint, E_BUFFER_TYPE Buffer=EBT_VERTEX_AND_INDEX ) IRR_OVERRIDE
|
||||
{
|
||||
if (Buffer==EBT_VERTEX_AND_INDEX || Buffer==EBT_VERTEX)
|
||||
getVertexBuffer().setHardwareMappingHint(NewMappingHint);
|
||||
@ -87,7 +87,7 @@ namespace scene
|
||||
}
|
||||
|
||||
//! flags the mesh as changed, reloads hardware buffers
|
||||
virtual void setDirty(E_BUFFER_TYPE Buffer=EBT_VERTEX_AND_INDEX) _IRR_OVERRIDE_
|
||||
virtual void setDirty(E_BUFFER_TYPE Buffer=EBT_VERTEX_AND_INDEX) IRR_OVERRIDE
|
||||
{
|
||||
if (Buffer==EBT_VERTEX_AND_INDEX || Buffer==EBT_VERTEX)
|
||||
getVertexBuffer().setDirty();
|
||||
@ -95,12 +95,12 @@ namespace scene
|
||||
getIndexBuffer().setDirty();
|
||||
}
|
||||
|
||||
virtual u32 getChangedID_Vertex() const _IRR_OVERRIDE_
|
||||
virtual u32 getChangedID_Vertex() const IRR_OVERRIDE
|
||||
{
|
||||
return getVertexBuffer().getChangedID();
|
||||
}
|
||||
|
||||
virtual u32 getChangedID_Index() const _IRR_OVERRIDE_
|
||||
virtual u32 getChangedID_Index() const IRR_OVERRIDE
|
||||
{
|
||||
return getIndexBuffer().getChangedID();
|
||||
}
|
||||
@ -109,7 +109,7 @@ namespace scene
|
||||
|
||||
//! Get type of vertex data which is stored in this meshbuffer.
|
||||
/** \return Vertex type of this buffer. */
|
||||
virtual video::E_VERTEX_TYPE getVertexType() const _IRR_OVERRIDE_
|
||||
virtual video::E_VERTEX_TYPE getVertexType() const IRR_OVERRIDE
|
||||
{
|
||||
return getVertexBuffer().getType();
|
||||
}
|
||||
@ -117,7 +117,7 @@ namespace scene
|
||||
//! Get access to vertex data. The data is an array of vertices.
|
||||
/** Which vertex type is used can be determined by getVertexType().
|
||||
\return Pointer to array of vertices. */
|
||||
virtual const void* getVertices() const _IRR_OVERRIDE_
|
||||
virtual const void* getVertices() const IRR_OVERRIDE
|
||||
{
|
||||
return getVertexBuffer().getData();
|
||||
}
|
||||
@ -125,78 +125,78 @@ namespace scene
|
||||
//! Get access to vertex data. The data is an array of vertices.
|
||||
/** Which vertex type is used can be determined by getVertexType().
|
||||
\return Pointer to array of vertices. */
|
||||
virtual void* getVertices() _IRR_OVERRIDE_
|
||||
virtual void* getVertices() IRR_OVERRIDE
|
||||
{
|
||||
return getVertexBuffer().getData();
|
||||
}
|
||||
|
||||
//! Get amount of vertices in meshbuffer.
|
||||
/** \return Number of vertices in this buffer. */
|
||||
virtual u32 getVertexCount() const _IRR_OVERRIDE_
|
||||
virtual u32 getVertexCount() const IRR_OVERRIDE
|
||||
{
|
||||
return getVertexBuffer().size();
|
||||
}
|
||||
|
||||
//! Get type of index data which is stored in this meshbuffer.
|
||||
/** \return Index type of this buffer. */
|
||||
virtual video::E_INDEX_TYPE getIndexType() const _IRR_OVERRIDE_
|
||||
virtual video::E_INDEX_TYPE getIndexType() const IRR_OVERRIDE
|
||||
{
|
||||
return getIndexBuffer().getType();
|
||||
}
|
||||
|
||||
//! Get access to indices.
|
||||
/** \return Pointer to indices array. */
|
||||
virtual const u16* getIndices() const _IRR_OVERRIDE_
|
||||
virtual const u16* getIndices() const IRR_OVERRIDE
|
||||
{
|
||||
return (u16*)getIndexBuffer().getData();
|
||||
}
|
||||
|
||||
//! Get access to indices.
|
||||
/** \return Pointer to indices array. */
|
||||
virtual u16* getIndices() _IRR_OVERRIDE_
|
||||
virtual u16* getIndices() IRR_OVERRIDE
|
||||
{
|
||||
return (u16*)getIndexBuffer().getData();
|
||||
}
|
||||
|
||||
//! Get amount of indices in this meshbuffer.
|
||||
/** \return Number of indices in this buffer. */
|
||||
virtual u32 getIndexCount() const _IRR_OVERRIDE_
|
||||
virtual u32 getIndexCount() const IRR_OVERRIDE
|
||||
{
|
||||
return getIndexBuffer().size();
|
||||
}
|
||||
|
||||
//! returns position of vertex i
|
||||
virtual const core::vector3df& getPosition(u32 i) const _IRR_OVERRIDE_
|
||||
virtual const core::vector3df& getPosition(u32 i) const IRR_OVERRIDE
|
||||
{
|
||||
return getVertexBuffer()[i].Pos;
|
||||
}
|
||||
|
||||
//! returns position of vertex i
|
||||
virtual core::vector3df& getPosition(u32 i) _IRR_OVERRIDE_
|
||||
virtual core::vector3df& getPosition(u32 i) IRR_OVERRIDE
|
||||
{
|
||||
return getVertexBuffer()[i].Pos;
|
||||
}
|
||||
|
||||
//! returns texture coords of vertex i
|
||||
virtual const core::vector2df& getTCoords(u32 i) const _IRR_OVERRIDE_
|
||||
virtual const core::vector2df& getTCoords(u32 i) const IRR_OVERRIDE
|
||||
{
|
||||
return getVertexBuffer()[i].TCoords;
|
||||
}
|
||||
|
||||
//! returns texture coords of vertex i
|
||||
virtual core::vector2df& getTCoords(u32 i) _IRR_OVERRIDE_
|
||||
virtual core::vector2df& getTCoords(u32 i) IRR_OVERRIDE
|
||||
{
|
||||
return getVertexBuffer()[i].TCoords;
|
||||
}
|
||||
|
||||
//! returns normal of vertex i
|
||||
virtual const core::vector3df& getNormal(u32 i) const _IRR_OVERRIDE_
|
||||
virtual const core::vector3df& getNormal(u32 i) const IRR_OVERRIDE
|
||||
{
|
||||
return getVertexBuffer()[i].Normal;
|
||||
}
|
||||
|
||||
//! returns normal of vertex i
|
||||
virtual core::vector3df& getNormal(u32 i) _IRR_OVERRIDE_
|
||||
virtual core::vector3df& getNormal(u32 i) IRR_OVERRIDE
|
||||
{
|
||||
return getVertexBuffer()[i].Normal;
|
||||
}
|
||||
|
Reference in New Issue
Block a user