Results 1 to 2 of 2

Thread: Reset all states

  1. #1
    Junior Member Newbie
    Join Date
    Mar 2005
    Posts
    7

    Reset all states

    Hi,

    is there a way to reset all the states (lighting, texturing, depth testing, ...) to there default values in a simple way?


    Thanks

  2. #2
    Senior Member Frequent Contributor
    Join Date
    Aug 2004
    Location
    munich, germany
    Posts
    659

    Re: Reset all states

    when you've made the context current for the first time, call glPushAttrib(GL_ALL_ATTRIB_BITS). this will save all attributes.

    afterwards, you can call glPopAttrib to restore the default states.

Similar Threads

  1. How to reset Transformations
    By VikingMacabro in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 05-01-2017, 06:31 AM
  2. OpenGL "reset"
    By in forum OpenGL: User Software
    Replies: 3
    Last Post: 10-27-2005, 09:46 AM
  3. Do drivers typically reset redundant states?
    By Stephen_H in forum OpenGL: Advanced Coding
    Replies: 4
    Last Post: 05-01-2005, 02:05 AM
  4. reset lighting
    By jyoung77 in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 03-24-2003, 12:55 PM
  5. Gamma reset
    By Jeremy Pronk in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 09-12-2001, 11:01 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean