Results 1 to 3 of 3

Thread: Opengl mode changing

  1. #1
    Junior Member Newbie
    Join Date
    Feb 2000
    Posts
    12

    Opengl mode changing

    When you Enable or Disable things like GL_DEPTH_TEST, so this reset values that are linked to the mode like GL_DEPTH_TEST => glDepthFunc()?

    eg.

    glEnable(GL_DEPTH_TEST);
    glDepthFunc(GL_LEQUAL);
    glDisable(GL_DEPTH_TEST);
    // do some stuff
    glEnable(GL_DEPTH_TEST);

    will glDepthFunc change it's value back to the default when i re-enable DEPTH_TEST???

  2. #2
    Senior Member OpenGL Guru
    Join Date
    Feb 2000
    Location
    Sweden
    Posts
    2,978

    Re: Opengl mode changing

    No, it will remain the same until you change it. It will even update to the new value you set even if it's disabled.

    Bob

  3. #3
    Junior Member Newbie
    Join Date
    Feb 2000
    Posts
    12

    Re: Opengl mode changing

    Ok, Thanks

Similar Threads

  1. Changing states vs Changing context
    By Yossi Koren in forum OpenGL: Basic Coding
    Replies: 12
    Last Post: 10-08-2017, 01:56 PM
  2. Changing wrap mode on the fly
    By nickels in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 08-18-2010, 03:07 PM
  3. changing title of glut game mode window
    By Radish in forum OpenGL: General
    Replies: 2
    Last Post: 10-27-2003, 07:49 AM
  4. changing window name in glut game mode
    By Radish in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 10-17-2003, 01:39 PM
  5. Changing refresh rate and interlaced video mode
    By Moz in forum OpenGL: Advanced Coding
    Replies: 0
    Last Post: 01-09-2001, 06:47 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