capturing current GL_ states, like popmatrix
Im tyring to find a fast solution to this problem;
i want to change the state of a lot of differetn enviroment varibles, such as GL_LIGHTING, glpolygonmode, gllinewidth, things like that.
i know theres already a push and pop matrix for coordinates and such, but is there a quick[cpu/gpu wise] and easy way for doing this with gl settings?
or am i to resort to testing, storing, changing and restoring each different enviroment varible?
__________________
graham "red" reeves.
red@deadpenguin.org
www.deadpenguin.org
found it :]
glPushAttrib(GL_ENABLE_BIT);
glPushAttrib(GL_LINE_BIT);
glPushAttrib(GL_POLYGON_BIT);
glPopAttrib();
glPopAttrib();
glPopAttrib();
__________________
graham "red" reeves.
red@deadpenguin.org
www.deadpenguin.org
glPushAttrib(GL_ENABLE_BIT);
glPushAttrib(GL_LINE_BIT);
glPushAttrib(GL_POLYGON_BIT);
glPopAttrib();
glPopAttrib();
glPopAttrib();
__________________
graham "red" reeves.
red@deadpenguin.org
www.deadpenguin.org
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement