glPushAttrib(GL_TEXTURE_BIT) replacement in opengl-es

HI !
I am trying to port a game on openGl-es, am stuck in the process with
glPushAttrib(GL_TEXTURE_BIT)
I made many unsucessfull attempts to replace it but everytime the result is missing text in the menue and many other things
Below is a replacement i have used for glPushAttrib(GL_LIGHTING_BIT | GL_DEPTH_BUFFER_BIT);
which is working fine but i am not able to find a similar replacement in glPushAttrib(GL_TEXTURE_BIT)
Please help

/**********************************/
GLboolean was_enabled ;
glPushAttrib(GL_LIGHTING_BIT | GL_DEPTH_BUFFER_BIT);

was_enabled = glIsEnabled (GL_COLOR_MATERIAL | GL_COLOR_MATERIAL_FACE | GL_LIGHT_MODEL_LOCAL_VIEWER | GL_LIGHT_MODEL_TWO_SIDE | GL_LIGHTING);

if (was_enabled)
{
    glEnable(GL_COLOR_MATERIAL);
    glEnable(GL_COLOR_MATERIAL_FACE);
    glEnable(GL_LIGHT_MODEL_LOCAL_VIEWER);
    glEnable(GL_LIGHT_MODEL_TWO_SIDE);
    glEnable(GL_LIGHTING);

}
else
{
    glDisable (GL_LIGHTING  | GL_DEPTH_TEST);
} 

/*********************************/
thanking you in anticipation

I’d guess you will need to use the corresponding state getter calls (glGetTexParameter… etc.) to retrieve all necessary settings, and later restore those values (instead of glPopAttrib).

  • HM

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.