From 4b7376692c9afc025aa3fbe361a4a6bf9df8c5f9 Mon Sep 17 00:00:00 2001 From: raven02 Date: Tue, 6 Aug 2013 15:58:04 +0800 Subject: [PATCH 1/2] Add restore() for logicop --- gfx_es2/gl_state.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gfx_es2/gl_state.cpp b/gfx_es2/gl_state.cpp index 026d24989e..3cbe18d2d7 100644 --- a/gfx_es2/gl_state.cpp +++ b/gfx_es2/gl_state.cpp @@ -39,6 +39,9 @@ void OpenGLState::Restore() { blendFunc.restore(); count++; blendColor.restore(); count++; + colorLogicOp.restore(); count++; + logicOp.restore(); count++; + scissorTest.restore(); count++; scissorRect.restore(); count++; From 6692390d6486d5c4e12b951eea2ce2deb7acc128 Mon Sep 17 00:00:00 2001 From: raven02 Date: Tue, 6 Aug 2013 15:59:48 +0800 Subject: [PATCH 2/2] Add Boolstate and STATE1 for logicop --- gfx_es2/gl_state.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gfx_es2/gl_state.h b/gfx_es2/gl_state.h index 889bc2f9fe..edda664824 100644 --- a/gfx_es2/gl_state.h +++ b/gfx_es2/gl_state.h @@ -202,6 +202,9 @@ public: STATE1(glBlendEquation, GLenum, GL_FUNC_ADD) blendEquation; STATEFLOAT4(glBlendColor, 1.0f) blendColor; + BoolState colorLogicOp; + STATE1(glLogicOp, GLenum, GL_COPY) logicOp; + BoolState scissorTest; BoolState cullFace;