mirror of
https://github.com/minetest/irrlicht.git
synced 2025-09-16 13:26:39 +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:
@@ -864,7 +864,7 @@ void COpenGLDriver::drawVertexPrimitiveList(const void* vertices, u32 vertexCoun
|
||||
else
|
||||
{
|
||||
// avoid passing broken pointer to OpenGL
|
||||
_IRR_DEBUG_BREAK_IF(ColorBuffer.size()==0);
|
||||
IRR_DEBUG_BREAK_IF(ColorBuffer.size()==0);
|
||||
glColorPointer(colorSize, GL_UNSIGNED_BYTE, 0, &ColorBuffer[0]);
|
||||
}
|
||||
}
|
||||
@@ -1191,7 +1191,7 @@ void COpenGLDriver::draw2DVertexPrimitiveList(const void* vertices, u32 vertexCo
|
||||
else
|
||||
{
|
||||
// avoid passing broken pointer to OpenGL
|
||||
_IRR_DEBUG_BREAK_IF(ColorBuffer.size()==0);
|
||||
IRR_DEBUG_BREAK_IF(ColorBuffer.size()==0);
|
||||
glColorPointer(colorSize, GL_UNSIGNED_BYTE, 0, &ColorBuffer[0]);
|
||||
}
|
||||
}
|
||||
@@ -1349,7 +1349,7 @@ void COpenGLDriver::draw2DImage(const video::ITexture* texture, const core::posi
|
||||
glColorPointer(colorSize, GL_UNSIGNED_BYTE, sizeof(S3DVertex), &(static_cast<const S3DVertex*>(Quad2DVertices))[0].Color);
|
||||
else
|
||||
{
|
||||
_IRR_DEBUG_BREAK_IF(ColorBuffer.size() == 0);
|
||||
IRR_DEBUG_BREAK_IF(ColorBuffer.size() == 0);
|
||||
glColorPointer(colorSize, GL_UNSIGNED_BYTE, 0, &ColorBuffer[0]);
|
||||
}
|
||||
|
||||
@@ -1433,7 +1433,7 @@ void COpenGLDriver::draw2DImage(const video::ITexture* texture, const core::rect
|
||||
glColorPointer(colorSize, GL_UNSIGNED_BYTE, sizeof(S3DVertex), &(static_cast<const S3DVertex*>(Quad2DVertices))[0].Color);
|
||||
else
|
||||
{
|
||||
_IRR_DEBUG_BREAK_IF(ColorBuffer.size() == 0);
|
||||
IRR_DEBUG_BREAK_IF(ColorBuffer.size() == 0);
|
||||
glColorPointer(colorSize, GL_UNSIGNED_BYTE, 0, &ColorBuffer[0]);
|
||||
}
|
||||
|
||||
@@ -1597,7 +1597,7 @@ void COpenGLDriver::draw2DImageBatch(const video::ITexture* texture,
|
||||
glColorPointer(colorSize, GL_UNSIGNED_BYTE, sizeof(S3DVertex), &(static_cast<const S3DVertex*>(Quad2DVertices))[0].Color);
|
||||
else
|
||||
{
|
||||
_IRR_DEBUG_BREAK_IF(ColorBuffer.size()==0);
|
||||
IRR_DEBUG_BREAK_IF(ColorBuffer.size()==0);
|
||||
glColorPointer(colorSize, GL_UNSIGNED_BYTE, 0, &ColorBuffer[0]);
|
||||
}
|
||||
|
||||
@@ -1768,7 +1768,7 @@ void COpenGLDriver::draw2DImageBatch(const video::ITexture* texture,
|
||||
glColorPointer(colorSize, GL_UNSIGNED_BYTE, sizeof(S3DVertex), &(static_cast<const S3DVertex*>(Quad2DVertices))[0].Color);
|
||||
else
|
||||
{
|
||||
_IRR_DEBUG_BREAK_IF(ColorBuffer.size()==0);
|
||||
IRR_DEBUG_BREAK_IF(ColorBuffer.size()==0);
|
||||
glColorPointer(colorSize, GL_UNSIGNED_BYTE, 0, &ColorBuffer[0]);
|
||||
}
|
||||
|
||||
@@ -1873,7 +1873,7 @@ void COpenGLDriver::draw2DRectangle(const core::rect<s32>& position,
|
||||
glColorPointer(colorSize, GL_UNSIGNED_BYTE, sizeof(S3DVertex), &(static_cast<const S3DVertex*>(Quad2DVertices))[0].Color);
|
||||
else
|
||||
{
|
||||
_IRR_DEBUG_BREAK_IF(ColorBuffer.size()==0);
|
||||
IRR_DEBUG_BREAK_IF(ColorBuffer.size()==0);
|
||||
glColorPointer(colorSize, GL_UNSIGNED_BYTE, 0, &ColorBuffer[0]);
|
||||
}
|
||||
|
||||
@@ -1916,7 +1916,7 @@ void COpenGLDriver::draw2DLine(const core::position2d<s32>& start,
|
||||
glColorPointer(colorSize, GL_UNSIGNED_BYTE, sizeof(S3DVertex), &(static_cast<const S3DVertex*>(Quad2DVertices))[0].Color);
|
||||
else
|
||||
{
|
||||
_IRR_DEBUG_BREAK_IF(ColorBuffer.size()==0);
|
||||
IRR_DEBUG_BREAK_IF(ColorBuffer.size()==0);
|
||||
glColorPointer(colorSize, GL_UNSIGNED_BYTE, 0, &ColorBuffer[0]);
|
||||
}
|
||||
|
||||
@@ -1954,7 +1954,7 @@ void COpenGLDriver::drawPixel(u32 x, u32 y, const SColor &color)
|
||||
glColorPointer(colorSize, GL_UNSIGNED_BYTE, sizeof(S3DVertex), &(static_cast<const S3DVertex*>(Quad2DVertices))[0].Color);
|
||||
else
|
||||
{
|
||||
_IRR_DEBUG_BREAK_IF(ColorBuffer.size()==0);
|
||||
IRR_DEBUG_BREAK_IF(ColorBuffer.size()==0);
|
||||
glColorPointer(colorSize, GL_UNSIGNED_BYTE, 0, &ColorBuffer[0]);
|
||||
}
|
||||
|
||||
@@ -2081,7 +2081,7 @@ bool COpenGLDriver::testGLError(int code)
|
||||
os::Printer::log("GL_INVALID_FRAMEBUFFER_OPERATION", core::stringc(code).c_str(), ELL_ERROR); break;
|
||||
#endif
|
||||
};
|
||||
// _IRR_DEBUG_BREAK_IF(true);
|
||||
// IRR_DEBUG_BREAK_IF(true);
|
||||
return true;
|
||||
#else
|
||||
return false;
|
||||
@@ -3447,7 +3447,7 @@ void COpenGLDriver::drawStencilShadow(bool clearStencilBuffer, video::SColor lef
|
||||
glColorPointer(colorSize, GL_UNSIGNED_BYTE, sizeof(S3DVertex), &(static_cast<const S3DVertex*>(Quad2DVertices))[0].Color);
|
||||
else
|
||||
{
|
||||
_IRR_DEBUG_BREAK_IF(ColorBuffer.size()==0);
|
||||
IRR_DEBUG_BREAK_IF(ColorBuffer.size()==0);
|
||||
glColorPointer(colorSize, GL_UNSIGNED_BYTE, 0, &ColorBuffer[0]);
|
||||
}
|
||||
|
||||
@@ -3558,7 +3558,7 @@ void COpenGLDriver::draw3DBox( const core::aabbox3d<f32>& box, SColor color )
|
||||
glColorPointer(colorSize, GL_UNSIGNED_BYTE, sizeof(S3DVertex), &(static_cast<const S3DVertex*>(v))[0].Color);
|
||||
else
|
||||
{
|
||||
_IRR_DEBUG_BREAK_IF(ColorBuffer.size()==0);
|
||||
IRR_DEBUG_BREAK_IF(ColorBuffer.size()==0);
|
||||
glColorPointer(colorSize, GL_UNSIGNED_BYTE, 0, &ColorBuffer[0]);
|
||||
}
|
||||
|
||||
@@ -3594,7 +3594,7 @@ void COpenGLDriver::draw3DLine(const core::vector3df& start,
|
||||
glColorPointer(colorSize, GL_UNSIGNED_BYTE, sizeof(S3DVertex), &(static_cast<const S3DVertex*>(Quad2DVertices))[0].Color);
|
||||
else
|
||||
{
|
||||
_IRR_DEBUG_BREAK_IF(ColorBuffer.size()==0);
|
||||
IRR_DEBUG_BREAK_IF(ColorBuffer.size()==0);
|
||||
glColorPointer(colorSize, GL_UNSIGNED_BYTE, 0, &ColorBuffer[0]);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user