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);