Results 1 to 2 of 2

Thread: glPushAttrib(GL_TEXTURE_BIT) replacement in opengl-es

  1. #1
    Junior Member
    Join Date
    Sep 2008
    Posts
    4

    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

  2. #2
    Senior Member
    Join Date
    Sep 2003
    Location
    Seattle, WA
    Posts
    246

    Re: glPushAttrib(GL_TEXTURE_BIT) replacement in opengl-es

    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

Similar Threads

  1. Replacement for glShadeModel on OpenGL ES 2.0
    By VansFannel in forum OpenGL ES 2X - for programmable 3D graphics pipelines
    Replies: 1
    Last Post: 08-23-2011, 02:55 AM
  2. equivalent to glPushAttrib()
    By crischprolch in forum OpenGL ES general technical discussions
    Replies: 4
    Last Post: 06-30-2008, 09:22 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •