mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2025-02-18 01:51:44 +00:00
GLES3: Explicitly don't handle gl_drawbuffer
GLES can't render to the front-buffer
This commit is contained in:
parent
e124ddb4d0
commit
0881a63b1e
2 changed files with 9 additions and 4 deletions
|
@ -1370,8 +1370,6 @@ SetupGL(void)
|
||||||
}
|
}
|
||||||
#endif // 0
|
#endif // 0
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// set up the FBO accordingly, but only if actually rendering the world
|
// set up the FBO accordingly, but only if actually rendering the world
|
||||||
// (=> don't use FBO when rendering the playermodel in the player menu)
|
// (=> don't use FBO when rendering the playermodel in the player menu)
|
||||||
// also, only do this when under water, because this has a noticeable overhead on some systems
|
// also, only do this when under water, because this has a noticeable overhead on some systems
|
||||||
|
@ -1880,6 +1878,12 @@ GL3_BeginFrame(float camera_separation)
|
||||||
{
|
{
|
||||||
gl_drawbuffer->modified = false;
|
gl_drawbuffer->modified = false;
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef YQ2_GL3_GLES
|
||||||
|
// OpenGL ES3 only supports GL_NONE, GL_BACK and GL_COLOR_ATTACHMENT*
|
||||||
|
// so this doesn't make sense here, see https://docs.gl/es3/glDrawBuffers
|
||||||
|
R_Printf(PRINT_ALL, "NOTE: gl_drawbuffer not supported by OpenGL ES!\n");
|
||||||
|
#else // Desktop GL
|
||||||
// TODO: stereo stuff
|
// TODO: stereo stuff
|
||||||
//if ((gl3state.camera_separation == 0) || gl3state.stereo_mode != STEREO_MODE_OPENGL)
|
//if ((gl3state.camera_separation == 0) || gl3state.stereo_mode != STEREO_MODE_OPENGL)
|
||||||
{
|
{
|
||||||
|
@ -1888,8 +1892,9 @@ GL3_BeginFrame(float camera_separation)
|
||||||
{
|
{
|
||||||
drawBuffer = GL_FRONT;
|
drawBuffer = GL_FRONT;
|
||||||
}
|
}
|
||||||
glDrawBuffers(1, &drawBuffer);
|
glDrawBuffer(drawBuffer);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/* texturemode stuff */
|
/* texturemode stuff */
|
||||||
|
|
|
@ -595,7 +595,7 @@ GLimp_InitGraphics(int fullscreen, int *pwidth, int *pheight)
|
||||||
/* Now that we've got a working window print it's mode. */
|
/* Now that we've got a working window print it's mode. */
|
||||||
int curdisplay = SDL_GetWindowDisplayIndex(window);
|
int curdisplay = SDL_GetWindowDisplayIndex(window);
|
||||||
|
|
||||||
if (curdisplay < 0) {
|
if (curdisplay < 0) {
|
||||||
curdisplay = 0;
|
curdisplay = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue