summaryrefslogtreecommitdiff
path: root/Source/Plugins/Plugin_VideoOGL/Src/FramebufferManager.cpp
diff options
context:
space:
mode:
authordegasus <wickmarkus@web.de>2012-12-07 21:09:48 +0100
committerRyan Houdek <Sonicadvance1@gmail.com>2012-12-13 15:27:46 -0600
commit6864b40e26354f6b366e8fe8c2ff4f6680f09189 (patch)
tree59177840789bb3a1cda64534611152c459110442 /Source/Plugins/Plugin_VideoOGL/Src/FramebufferManager.cpp
parent888b5fb061363d6ce644d7ebacb76b82778801c4 (diff)
reset glEnableClientState befor every draw
should be done with VAO, but atm, this is not possible :-( this also partial revert the fix in fb92c338af83 (activating texture0 globally). Signed-off-by: Ryan Houdek <Sonicadvance1@gmail.com>
Diffstat (limited to 'Source/Plugins/Plugin_VideoOGL/Src/FramebufferManager.cpp')
-rw-r--r--Source/Plugins/Plugin_VideoOGL/Src/FramebufferManager.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/Source/Plugins/Plugin_VideoOGL/Src/FramebufferManager.cpp b/Source/Plugins/Plugin_VideoOGL/Src/FramebufferManager.cpp
index 7e3244f634..8c3c3f3fca 100644
--- a/Source/Plugins/Plugin_VideoOGL/Src/FramebufferManager.cpp
+++ b/Source/Plugins/Plugin_VideoOGL/Src/FramebufferManager.cpp
@@ -17,6 +17,7 @@
#include "Globals.h"
#include "FramebufferManager.h"
+#include "VertexShaderGen.h"
#include "TextureConverter.h"
#include "Render.h"
@@ -324,6 +325,22 @@ void XFBSource::Draw(const MathUtil::Rectangle<float> &sourcerc,
1.0f, 0.0f
};
+ // disable all pointer, TODO: use VAO
+ glEnableClientState(GL_VERTEX_ARRAY);
+ glDisableVertexAttribArray(SHADER_POSMTX_ATTRIB);
+ glDisableClientState(GL_NORMAL_ARRAY);
+ glDisableVertexAttribArray(SHADER_NORM1_ATTRIB);
+ glDisableVertexAttribArray(SHADER_NORM2_ATTRIB);
+ glDisableClientState(GL_COLOR_ARRAY);
+ glDisableClientState(GL_SECONDARY_COLOR_ARRAY);
+ glClientActiveTexture(GL_TEXTURE0);
+ glEnableClientState(GL_TEXTURE_COORD_ARRAY);
+ glClientActiveTexture(GL_TEXTURE1);
+ glEnableClientState(GL_TEXTURE_COORD_ARRAY);
+ for(int i=2; i<8; i++) {
+ glClientActiveTexture(GL_TEXTURE0 + i);
+ glDisableClientState(GL_TEXTURE_COORD_ARRAY);
+ }
glVertexPointer(2, GL_FLOAT, 0, vtx1);
glClientActiveTexture(GL_TEXTURE0);