[ioquake3] 09/25: OpenGL2: Don't bind null framebuffers when not using framebuffers.

Simon McVittie smcv at debian.org
Sun Mar 12 18:23:25 UTC 2017


This is an automated email from the git hooks/post-receive script.

smcv pushed a commit to branch debian/master
in repository ioquake3.

commit 730207817ef1e4cf09b7b7ee215c1d16065099bb
Author: SmileTheory <SmileTheory at gmail.com>
Date:   Wed Dec 7 14:13:29 2016 -0800

    OpenGL2: Don't bind null framebuffers when not using framebuffers.
---
 code/renderergl2/tr_fbo.c  | 6 ++++++
 code/renderergl2/tr_init.c | 4 +++-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/code/renderergl2/tr_fbo.c b/code/renderergl2/tr_fbo.c
index 41cfdd7..aa5148c 100644
--- a/code/renderergl2/tr_fbo.c
+++ b/code/renderergl2/tr_fbo.c
@@ -230,6 +230,12 @@ FBO_Bind
 */
 void FBO_Bind(FBO_t * fbo)
 {
+	if (!glRefConfig.framebufferObject)
+	{
+		ri.Printf(PRINT_WARNING, "FBO_Bind() called without framebuffers enabled!\n");
+		return;
+	}
+
 	if (glState.currentFBO == fbo)
 		return;
 		
diff --git a/code/renderergl2/tr_init.c b/code/renderergl2/tr_init.c
index 7b9c21a..2e65a52 100644
--- a/code/renderergl2/tr_init.c
+++ b/code/renderergl2/tr_init.c
@@ -951,7 +951,9 @@ void GL_SetDefaultState( void )
 	qglColor4f (1,1,1,1);
 
 	GL_BindNullTextures();
-	GL_BindNullFramebuffers();
+
+	if (glRefConfig.framebufferObject)
+		GL_BindNullFramebuffers();
 
 	qglEnable(GL_TEXTURE_2D);
 	GL_TextureMode( r_textureMode->string );

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/ioquake3.git



More information about the Pkg-games-commits mailing list