Commit ae6c49d2 authored by hybrid's avatar hybrid

Fix problem with new vertex_array_bgra extension on OSX. Thanks to Auria for...

Fix problem with new vertex_array_bgra extension on OSX. Thanks to Auria for online debugging this issue.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@3624 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 6990bb1d
...@@ -1720,7 +1720,9 @@ void COpenGLDriver::draw2DVertexPrimitiveList(const void* vertices, u32 vertexCo ...@@ -1720,7 +1720,9 @@ void COpenGLDriver::draw2DVertexPrimitiveList(const void* vertices, u32 vertexCo
if (vertices) if (vertices)
{ {
#if defined(GL_ARB_vertex_array_bgra) || defined(GL_EXT_vertex_array_bgra) //due to missing defines in OSX headers, we have to be more specific with this check
//#if defined(GL_ARB_vertex_array_bgra) || defined(GL_EXT_vertex_array_bgra)
#ifdef GL_BGRA
if (FeatureAvailable[IRR_ARB_vertex_array_bgra] || FeatureAvailable[IRR_EXT_vertex_array_bgra]) if (FeatureAvailable[IRR_ARB_vertex_array_bgra] || FeatureAvailable[IRR_EXT_vertex_array_bgra])
{ {
switch (vType) switch (vType)
...@@ -1738,8 +1740,12 @@ void COpenGLDriver::draw2DVertexPrimitiveList(const void* vertices, u32 vertexCo ...@@ -1738,8 +1740,12 @@ void COpenGLDriver::draw2DVertexPrimitiveList(const void* vertices, u32 vertexCo
} }
else else
#endif #endif
{
// avoid passing broken pointer to OpenGL
_IRR_DEBUG_BREAK_IF(ColorBuffer.size()==0);
glColorPointer(4, GL_UNSIGNED_BYTE, 0, &ColorBuffer[0]); glColorPointer(4, GL_UNSIGNED_BYTE, 0, &ColorBuffer[0]);
} }
}
switch (vType) switch (vType)
{ {
......
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