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++; 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) };