PDA

View Full Version : Initial states



ml
12-27-2003, 08:53 PM
I'm currently coding a class to keep track of gl-states to avoid redundant changes and came across the following from a reference for glEnable:


The initial value for each capability with the exception of GL_DITHER is GL_FALSE.
The initial value for GL_DITHER is GL_TRUE.
This is quoted from http://tc1.chemie.uni-bielefeld.de/doc/OpenGL/hp/Reference/glEnable.html , the documentation for HP's OpenGL implementation.
What I'm wondering is; is the initial state something that is consistent between vendors?
Eg. does ATIs' drivers set every state as NVidia sets theirs?
I'm just looking to avoid coding a routine to sync every available state at startup, as you might have guessed.

Thanks for any advice, on either this or state-management in general!

Edit:
From 3DLabs spec.:

The initial value for each capability with the exceptions of GL_DITHER and GL_MULTISAMPLE_EXT is GL_FALSE. The initial value for GL_DITHER and for GL_MULTISAMPLE_EXT is GL_TRUE.
I suppose it's safe to assume that initial values are the same across vendors.

[This message has been edited by ml (edited 12-27-2003).]

zeckensack
12-27-2003, 10:55 PM
Originally posted by ml:
I suppose it's safe to assume that initial values are the same across vendors.Yes, it is. Search the OpenGL spec for "initial" and you'll find it scattered everywhere. Refer to section 6.2 ("State Tables") for a quick overview.
Initial values for state newly adde by extensions is listed in the extension documents, most of the time.