glDrawBuffer is only available in Desktop OpenGL, while the equivalent
glDrawBuffers is valid also for GLES.
Just defining glDrawBuffer as an empty macro is obviously not the right
solution, as the call is also required on GLES. This also causes
a compilation failure - GL.h may be included via GLX.h on X11 platforms,
and the glDrawBuffer prototype declaration becomes malformed.
Gbp-Pq: Name 81_allow_gles_platforms.patch
if (this->SavedDrawBuffer != GL_BACK_LEFT)
{
- glDrawBuffer(this->SavedDrawBuffer);
+ const GLenum bufs[1] = { static_cast<GLenum>(this->SavedDrawBuffer) };
+ ::glDrawBuffers(1, bufs);
}
ostate->vtkglClearColor(this->SavedClearColor[0], this->SavedClearColor[1],
/* some fixes for both ES 2 and 3 */
#ifdef GL_ES_VERSION_3_0
-# define glDrawBuffer(arg)
# define GL_BACK_LEFT 0
# define GL_BACK_RIGHT 0
# define GL_FRONT_LEFT 0