11-18-2002, 10:05 PM
Once you've made a call to glMaterialfv(...) is there a way to return to the state before this call was made?
I've written a program for exploring what an object (a sphere) will look like as I change the RGBA reflection coeffecients. Code in question looks something like this:
if (mat_amb_cb == 1) glMaterialfv(GL_FRONT, GL_AMBIENT, matAmb);
if (mat_dif_cb == 1) glMaterialfv(GL_FRONT, GL_DIFFUSE, matDif);
...
drawSphere();
...
The if statments are not excuted till I check the appropriate check box. Once they are unchecked, and those lines are not longer executed in the rendering routine the sphere will still retain those material properties.
Why???
I've written a program for exploring what an object (a sphere) will look like as I change the RGBA reflection coeffecients. Code in question looks something like this:
if (mat_amb_cb == 1) glMaterialfv(GL_FRONT, GL_AMBIENT, matAmb);
if (mat_dif_cb == 1) glMaterialfv(GL_FRONT, GL_DIFFUSE, matDif);
...
drawSphere();
...
The if statments are not excuted till I check the appropriate check box. Once they are unchecked, and those lines are not longer executed in the rendering routine the sphere will still retain those material properties.
Why???