From 888b5fb061363d6ce644d7ebacb76b82778801c4 Mon Sep 17 00:00:00 2001 From: degasus Date: Fri, 7 Dec 2012 14:40:52 +0100 Subject: [PATCH] remove usage of glMultiTexCoord2f Signed-off-by: Ryan Houdek --- .../Plugin_VideoOGL/Src/FramebufferManager.cpp | 15 +++++++++------ Source/Plugins/Plugin_VideoOGL/Src/Render.cpp | 14 +++++++++----- .../Plugins/Plugin_VideoOGL/Src/TextureCache.cpp | 1 + .../Plugin_VideoOGL/Src/TextureConverter.cpp | 2 ++ 4 files changed, 21 insertions(+), 11 deletions(-) diff --git a/Source/Plugins/Plugin_VideoOGL/Src/FramebufferManager.cpp b/Source/Plugins/Plugin_VideoOGL/Src/FramebufferManager.cpp index 76e4b8156b..7e3244f634 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/FramebufferManager.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/FramebufferManager.cpp @@ -317,16 +317,19 @@ void XFBSource::Draw(const MathUtil::Rectangle &sourcerc, sourcerc.right, sourcerc.top, sourcerc.right, sourcerc.bottom }; + GLfloat tex2[] = { // For TEXTURE1 + 0.0f, 0.0f, + 0.0f, 1.0f, + 1.0f, 1.0f, + 1.0f, 0.0f + }; - glClientActiveTexture(GL_TEXTURE0); - - glMultiTexCoord2f(GL_TEXTURE1, 0, 0); - glMultiTexCoord2f(GL_TEXTURE1, 0, 1); - glMultiTexCoord2f(GL_TEXTURE1, 1, 1); - glMultiTexCoord2f(GL_TEXTURE1, 1, 0); glVertexPointer(2, GL_FLOAT, 0, vtx1); + glClientActiveTexture(GL_TEXTURE0); glTexCoordPointer(2, GL_FLOAT, 0, tex1); + glClientActiveTexture(GL_TEXTURE1); + glTexCoordPointer(2, GL_FLOAT, 0, tex2); glDrawArrays(GL_TRIANGLE_FAN, 0, 4); diff --git a/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp b/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp index 00f971a31b..d912277150 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp @@ -1153,18 +1153,22 @@ void Renderer::Swap(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight,cons right, top, right, bottom }; + GLfloat tex2[] = { // For TEXTURE1 + 0.0f, 0.0f, + 0.0f, 1.0f, + 1.0f, 1.0f, + 1.0f, 0.0f + }; - glClientActiveTexture(GL_TEXTURE0); if (applyShader) { - glMultiTexCoord2f(GL_TEXTURE1, 0, 0); - glMultiTexCoord2f(GL_TEXTURE1, 0, 1); - glMultiTexCoord2f(GL_TEXTURE1, 1, 1); - glMultiTexCoord2f(GL_TEXTURE1, 1, 0); + glClientActiveTexture(GL_TEXTURE1); + glTexCoordPointer(2, GL_FLOAT, 0, tex2); } glVertexPointer(3, GL_FLOAT, 0, vtx1); + glClientActiveTexture(GL_TEXTURE0); glTexCoordPointer(2, GL_FLOAT, 0, tex1); glDrawArrays(GL_TRIANGLE_FAN, 0, 4); diff --git a/Source/Plugins/Plugin_VideoOGL/Src/TextureCache.cpp b/Source/Plugins/Plugin_VideoOGL/Src/TextureCache.cpp index 797ba39c10..6827539ce8 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/TextureCache.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/TextureCache.cpp @@ -319,6 +319,7 @@ void TextureCache::TCacheEntry::FromRenderTarget(u32 dstAddr, unsigned int dstFo 1.f, 1.f }; + glClientActiveTexture(GL_TEXTURE0); glTexCoordPointer(2, GL_FLOAT, 0, tex1); glVertexPointer(2, GL_FLOAT, 0, vtx1); glDrawArrays(GL_TRIANGLE_FAN, 0, 4); diff --git a/Source/Plugins/Plugin_VideoOGL/Src/TextureConverter.cpp b/Source/Plugins/Plugin_VideoOGL/Src/TextureConverter.cpp index 306fa5e298..86e4d09301 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/TextureConverter.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/TextureConverter.cpp @@ -228,6 +228,7 @@ void EncodeToRamUsingShader(FRAGMENTSHADER& shader, GLuint srcTexture, const Tar 1.f, -1.f }; + glClientActiveTexture(GL_TEXTURE0); glTexCoordPointer(2, GL_FLOAT, 0, tex1); glVertexPointer(2, GL_FLOAT, 0, vtx1); glDrawArrays(GL_TRIANGLE_FAN, 0, 4); @@ -401,6 +402,7 @@ void DecodeToTexture(u32 xfbAddr, int srcWidth, int srcHeight, GLuint destTextur -1.f, -1.f }; + glClientActiveTexture(GL_TEXTURE0); glTexCoordPointer(2, GL_FLOAT, 0, tex1); glVertexPointer(2, GL_FLOAT, 0, vtx1); glDrawArrays(GL_TRIANGLE_FAN, 0, 4);