From d05379b340d20d53efeaf4e48657d61af6bef1d2 Mon Sep 17 00:00:00 2001 From: Themaister Date: Wed, 30 Mar 2011 11:12:27 +0200 Subject: [PATCH] Should fix FBO issue. --- gfx/gl.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gfx/gl.c b/gfx/gl.c index 72987b4538e..d5743336234 100644 --- a/gfx/gl.c +++ b/gfx/gl.c @@ -1059,14 +1059,16 @@ static bool gl_xml_shader(void *data, const char *path) { pglDeleteFramebuffers(gl->fbo_pass, gl->fbo); glDeleteTextures(gl->fbo_pass, gl->fbo_texture); - memset(gl->fbo_texture, 0, gl->fbo_pass * sizeof(GLuint)); - memset(gl->fbo, 0, gl->fbo_pass * sizeof(GLuint)); + memset(gl->fbo_texture, 0, sizeof(gl->fbo_texture)); + memset(gl->fbo, 0, sizeof(gl->fbo)); gl->fbo_inited = false; gl->render_to_tex = false; gl->fbo_pass = 0; if (!gl_check_error()) SSNES_WARN("Failed to deinit FBO properly!\n"); + + glBindTexture(GL_TEXTURE_2D, gl->texture); } #endif