From 679957dc983f40893bd2f4fb6d0e75b43a0f13cc Mon Sep 17 00:00:00 2001 From: Ryan Houdek Date: Mon, 2 Sep 2013 01:44:46 -0500 Subject: [PATCH] Fix Non-GLES run path in videosoftware for the previous commit. --- .../Plugin_VideoSoftware/Src/SWRenderer.cpp | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/Source/Plugins/Plugin_VideoSoftware/Src/SWRenderer.cpp b/Source/Plugins/Plugin_VideoSoftware/Src/SWRenderer.cpp index e56a4b7b37..3be03147d6 100644 --- a/Source/Plugins/Plugin_VideoSoftware/Src/SWRenderer.cpp +++ b/Source/Plugins/Plugin_VideoSoftware/Src/SWRenderer.cpp @@ -129,26 +129,14 @@ void SWRenderer::DrawButton(int texID, float *coords) glEnable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); - //Texture rectangle uses pixel coordinates -#ifndef USE_GLES - GLfloat u_max = (GLfloat)width; - GLfloat v_max = (GLfloat)height; - - static const GLfloat texverts[4][2] = { - {0, v_max}, - {0, 0}, - {u_max, 0}, - {u_max, v_max} - }; -#else static const GLfloat texverts[4][2] = { {0, 1}, {0, 0}, {1, 0}, {1, 1} }; -#endif - glBindTexture(TEX2D, texID); + + glBindTexture(GL_TEXTURE_2D, texID); glVertexAttribPointer(attr_pos, 2, GL_FLOAT, GL_FALSE, 0, coords); glVertexAttribPointer(attr_tex, 2, GL_FLOAT, GL_FALSE, 0, texverts); @@ -160,7 +148,7 @@ void SWRenderer::DrawButton(int texID, float *coords) glDisableVertexAttribArray(attr_pos); glDisableVertexAttribArray(attr_tex); - glBindTexture(TEX2D, 0); + glBindTexture(GL_TEXTURE_2D, 0); glDisable(GL_BLEND); }