Commit 4d7f18cd authored by hybrid's avatar hybrid

Fix extension check changes also in drawVertexPrimitiveList

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@3625 dfc29bdd-3216-0410-991c-e03cc46cb475
parent ae6c49d2
...@@ -1400,7 +1400,9 @@ void COpenGLDriver::drawVertexPrimitiveList(const void* vertices, u32 vertexCoun ...@@ -1400,7 +1400,9 @@ void COpenGLDriver::drawVertexPrimitiveList(const void* vertices, u32 vertexCoun
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)
...@@ -1418,7 +1420,11 @@ void COpenGLDriver::drawVertexPrimitiveList(const void* vertices, u32 vertexCoun ...@@ -1418,7 +1420,11 @@ void COpenGLDriver::drawVertexPrimitiveList(const void* vertices, u32 vertexCoun
} }
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