Fixed GL state.

This commit is contained in:
bkaradzic 2012-06-23 13:12:53 -07:00
parent edef345b5a
commit 8f3eb01cda

View file

@ -2008,8 +2008,7 @@ namespace bgfx
uint32_t ref = (newFlags&BGFX_STATE_ALPHA_REF_MASK)>>BGFX_STATE_ALPHA_REF_SHIFT;
alphaRef = ref/255.0f;
#if BGFX_CONFIG_RENDERER_OPENGLES
#else
#if BGFX_CONFIG_RENDERER_OPENGL
if (BGFX_STATE_ALPHA_TEST & newFlags)
{
GL_CHECK(glEnable(GL_ALPHA_TEST) );
@ -2018,14 +2017,16 @@ namespace bgfx
{
GL_CHECK(glDisable(GL_ALPHA_TEST) );
}
#endif // BGFX_CONFIG_RENDERER_OPENGL
}
#if BGFX_CONFIG_RENDERER_OPENGL
if ( (BGFX_STATE_PT_POINTS|BGFX_STATE_POINT_SIZE_MASK) & changedFlags)
{
float pointSize = (float)(uint32_max(1, (newFlags&BGFX_STATE_POINT_SIZE_MASK)>>BGFX_STATE_POINT_SIZE_SHIFT) );
GL_CHECK(glPointSize(pointSize) );
}
#endif // BGFX_CONFIG_RENDERER_OPENGLES
}
#endif // BGFX_CONFIG_RENDERER_OPENGL
if ( (BGFX_STATE_ALPHA_WRITE|BGFX_STATE_RGB_WRITE) & changedFlags)
{