This will be needed for screenshots to work with GLES when standard
builds support both GLES and GL.
Signed-off-by: bones_was_here <bones_was_here@xonotic.au>
switch(vid.renderpath)
{
case RENDERPATH_GL32:
- case RENDERPATH_GLES2:
CHECKGLERROR
-#ifndef GL_BGRA
+ qglReadPixels(x, y, width, height, GL_BGRA, GL_UNSIGNED_BYTE, outpixels);CHECKGLERROR
+ break;
+ case RENDERPATH_GLES2: // glReadPixels() lacks GL_BGRA support (even in ES 3.2)
+ CHECKGLERROR
{
int i;
int r;
// outpixels[i+3] = a;
}
}
-#else
- qglReadPixels(x, y, width, height, GL_BGRA, GL_UNSIGNED_BYTE, outpixels);CHECKGLERROR
-#endif
- break;
+ break;
}
}