From 107d2986d49322f8e258f3c5af7773a5dfce046b Mon Sep 17 00:00:00 2001 From: raven02 Date: Thu, 5 Sep 2013 15:03:51 +0800 Subject: [PATCH 1/2] Add glstate.alphaTestQCOM & alphaFuncQCOM --- gfx_es2/gl_state.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gfx_es2/gl_state.h b/gfx_es2/gl_state.h index a6b7a53bf6..bdba14f99d 100644 --- a/gfx_es2/gl_state.h +++ b/gfx_es2/gl_state.h @@ -267,6 +267,12 @@ public: STATE3(glStencilOp, GLenum, GLenum, GLenum, GL_KEEP, GL_KEEP, GL_KEEP) stencilOp; STATE3(glStencilFunc, GLenum, GLint, GLuint, GL_ALWAYS, 0, 0xFF) stencilFunc; +#ifdef ANDROID + // QCOM Alpha Test + BoolState alphaTestQCOM; + STATE2(glAlphaFuncQCOM, GLenum, GLclampf, GL_ALWAYS, 0.0f) alphaFuncQCOM; +#endif + // Only works on Win32, all other platforms are "force-vsync" void SetVSyncInterval(int interval); // one of the above VSYNC, or a higher number for multi-frame waits (could be useful for 30hz games) }; From bb028539174e2071dd8450077268c090a9cba025 Mon Sep 17 00:00:00 2001 From: raven02 Date: Thu, 5 Sep 2013 15:05:28 +0800 Subject: [PATCH 2/2] Restore() for alphaTestQCOM & alphaFuncQCOM --- gfx_es2/gl_state.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gfx_es2/gl_state.cpp b/gfx_es2/gl_state.cpp index 4c905f91d1..2a1cfcd3d0 100644 --- a/gfx_es2/gl_state.cpp +++ b/gfx_es2/gl_state.cpp @@ -47,6 +47,13 @@ void OpenGLState::Restore() { logicOp.restore(); count++; #endif +#ifdef ANDROID + if (gl_extensions.QCOM_alpha_test) { + alphaTestQCOM.restore(); count++; + alphaFuncQCOM.restore(); count++; + } +#endif + scissorTest.restore(); count++; scissorRect.restore(); count++;