From d627a5b6aae2ca2ff82f6f1123ed60e03c432010 Mon Sep 17 00:00:00 2001 From: rogerman Date: Tue, 28 Apr 2015 00:39:48 +0000 Subject: [PATCH] OpenGL Renderer: - Fix bug where certain scenes would fail to draw when edge marking is enabled. --- desmume/src/OGLRender.cpp | 4 ---- desmume/src/OGLRender_3_2.cpp | 4 ---- 2 files changed, 8 deletions(-) diff --git a/desmume/src/OGLRender.cpp b/desmume/src/OGLRender.cpp index 475722a4d..61837e009 100644 --- a/desmume/src/OGLRender.cpp +++ b/desmume/src/OGLRender.cpp @@ -3497,10 +3497,8 @@ Render3DError OpenGLRenderer_2_0::RenderEdgeMarking(const u16 *colorTable) glBindTexture(GL_TEXTURE_2D, OGLRef.texGDepthID); glActiveTexture(GL_TEXTURE0 + OGLTextureUnitID_GPolyID); glBindTexture(GL_TEXTURE_2D, OGLRef.texGPolyID); - glActiveTexture(GL_TEXTURE0); glDrawElements(GL_TRIANGLES, 6, GL_UNSIGNED_BYTE, 0); - glBindTexture(GL_TEXTURE_2D, 0); if (this->isVAOSupported) { @@ -3580,10 +3578,8 @@ Render3DError OpenGLRenderer_2_0::RenderFog(const u8 *densityTable, const u32 co glBindTexture(GL_TEXTURE_2D, OGLRef.texGDepthID); glActiveTexture(GL_TEXTURE0 + OGLTextureUnitID_FogAttr); glBindTexture(GL_TEXTURE_2D, OGLRef.texGFogAttrID); - glActiveTexture(GL_TEXTURE0); glDrawElements(GL_TRIANGLES, 6, GL_UNSIGNED_BYTE, 0); - glBindTexture(GL_TEXTURE_2D, 0); if (this->isVAOSupported) { diff --git a/desmume/src/OGLRender_3_2.cpp b/desmume/src/OGLRender_3_2.cpp index 274649b53..7a4534169 100644 --- a/desmume/src/OGLRender_3_2.cpp +++ b/desmume/src/OGLRender_3_2.cpp @@ -942,10 +942,8 @@ Render3DError OpenGLRenderer_3_2::RenderEdgeMarking(const u16 *colorTable) glBindTexture(GL_TEXTURE_2D, OGLRef.texGDepthID); glActiveTexture(GL_TEXTURE0 + OGLTextureUnitID_GPolyID); glBindTexture(GL_TEXTURE_2D, OGLRef.texGPolyID); - glActiveTexture(GL_TEXTURE0); glDrawElements(GL_TRIANGLES, 6, GL_UNSIGNED_BYTE, 0); - glBindTexture(GL_TEXTURE_2D, 0); glBindVertexArray(0); @@ -1001,10 +999,8 @@ Render3DError OpenGLRenderer_3_2::RenderFog(const u8 *densityTable, const u32 co glBindTexture(GL_TEXTURE_2D, OGLRef.texGDepthID); glActiveTexture(GL_TEXTURE0 + OGLTextureUnitID_FogAttr); glBindTexture(GL_TEXTURE_2D, OGLRef.texGFogAttrID); - glActiveTexture(GL_TEXTURE0); glDrawElements(GL_TRIANGLES, 6, GL_UNSIGNED_BYTE, 0); - glBindTexture(GL_TEXTURE_2D, 0); glBindVertexArray(0);