capturing current GL_ states, like popmatrix

Started by
1 comment, last by redmonkey 22 years, 8 months ago
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
__________________graham "red" reeves.[email=red@deadpenguin.org]red@deadpenguin.org[/email]www.deadpenguin.org
Advertisement
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
__________________graham "red" reeves.[email=red@deadpenguin.org]red@deadpenguin.org[/email]www.deadpenguin.org
GL_ALL_ATTRIB_BITS
Celeron ][ 566 @ 850256MB PC-100 CAS2 RAMDFI PA-61 Mainboard (250MB memory bandwidth sucks, it should be 500MB)ATI Radeon 32MB DDR LEWindows 98SE

This topic is closed to new replies.

Advertisement