Results 1 to 3 of 3

Thread: How to reset the OpenGL window?

  1. #1
    Junior Member Newbie
    Join Date
    Aug 2004
    Posts
    7

    How to reset the OpenGL window?

    I have drawn a 3D model in the window,but I don't know how to reset the window to the initial state?Anyone can help me?

  2. #2
    Senior Member Regular Contributor
    Join Date
    Apr 2001
    Posts
    340

    Re: How to reset the OpenGL window?

    glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);

  3. #3
    Senior Member OpenGL Guru zed's Avatar
    Join Date
    Nov 2010
    Posts
    2,466

    Re: How to reset the OpenGL window?

    one way would be to stick around the code

    glPushAtrribs( GL_ALL_ATTRIB_BITS );
    ..
    ..
    glPopAttrib();

    ie after the pop the state before the push will be restored

Similar Threads

  1. How to reset all OpenGL state
    By anime.igala.net in forum OpenGL: Advanced Coding
    Replies: 7
    Last Post: 08-20-2008, 10:59 PM
  2. OpenGL "reset"
    By in forum OpenGL: User Software
    Replies: 3
    Last Post: 10-27-2005, 09:46 AM
  3. HOWTO reset OpenGL
    By lehrig in forum OpenGL: Linux
    Replies: 2
    Last Post: 10-18-2002, 08:04 AM
  4. matrix storage and Window reset problems
    By in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 06-12-2002, 04:34 AM
  5. overlay a semi-transparent window on an OpenGL window
    By Coconut in forum OpenGL: Advanced Coding
    Replies: 2
    Last Post: 02-17-2002, 07:01 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
  •  
Proudly hosted by Digital Ocean