mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-29 07:41:47 +00:00
GL3: Only use FBO if under water
because on some systems (like RPi4 with my experimental GLES3 branch) the overhead of a FBO is really noticeable, so no reason to pay for it when it's not needed
This commit is contained in:
parent
3d619a1441
commit
c6145b4e6a
1 changed files with 3 additions and 1 deletions
|
@ -1357,7 +1357,9 @@ SetupGL(void)
|
|||
|
||||
// set up the FBO accordingly, but only if actually rendering the world
|
||||
// (=> don't use FBO when rendering the playermodel in the player menu)
|
||||
if (gl3_usefbo->value && (gl3_newrefdef.rdflags & RDF_NOWORLDMODEL) == 0 && gl3state.ppFBO != 0)
|
||||
// also, only do this when under water, because this has a noticeable overhead on some systems
|
||||
if (gl3_usefbo->value && gl3state.ppFBO != 0
|
||||
&& (gl3_newrefdef.rdflags & (RDF_NOWORLDMODEL|RDF_UNDERWATER)) == RDF_UNDERWATER)
|
||||
{
|
||||
glBindFramebuffer(GL_FRAMEBUFFER, gl3state.ppFBO);
|
||||
gl3state.ppFBObound = true;
|
||||
|
|
Loading…
Reference in a new issue