Quick question.
It seems glPushAttrib(GL_ALL_ATTRIB_BITS); doesn’t save which is the currently active texture unit. Is this correct?
cheers.
Quick question.
It seems glPushAttrib(GL_ALL_ATTRIB_BITS); doesn’t save which is the currently active texture unit. Is this correct?
cheers.
Correct, there’s a client state version of that glPushClientAttrib(…).
EDIT: I think
[This message has been edited by PH (edited 07-31-2002).]
hmmmm… so glPushClientAttrib saves client states like active texture units eh? How do I know what a client state, and whats a server state?
I made a mistake - glActiveTexture(…) is a server state where as glClientActiveTexture(…) is a client state.
I’m actually looking at the GL1.4 spec right now ( it says which group things belong to ).
Hmmm… well glPushAttrib(ALL), doesn’t save the glActiveTextureUnit value on my system here.
Unless its a bug.
I’ll try it on my Radeon 8500 and see what it does…just a sec.
Done, it works for me.
hmmmmm…
you sure you used ALL attrib bits? and glActiveTextureUnit function?
Matt??
I’m using 30.30 drivers on gf4 if anyones interested.
Nutty
This is the test I used,
int Test;
glActiveTextureARB( GL_TEXTURE2_ARB );
glPushAttrib( GL_ALL_ATTRIB_BITS );glActiveTextureARB( GL_TEXTURE3_ARB );
glGetIntegerv( GL_ACTIVE_TEXTURE_ARB, &Test );
printf( "Before 0x%X
", Test );glPopAttrib();
glGetIntegerv( GL_ACTIVE_TEXTURE_ARB, &Test );
printf( "After 0x%X
", Test );
And the result,
Before 0x84C3 ( == GL_TEXTURE3_ARB )
After 0x84C2 ( == GL_TEXTURE2_ARB )
With the same code I get.
0x84C3
0x84C3
The same value twice. It’s either a bug, or its not called for in the spec.
It’s a bug - have a look at Table 6.17 in the GL1.4 spec. It says that GL_ACTIVE_TEXTURE is part of the attribute group ‘texture’ which means it should be pushed/poped. Also, some info on pages 214/5.
This is a known bug that will be fixed in a future driver release.
Originally posted by mcraighead:
[b]This is a known bug that will be fixed in a future driver release.
- Matt[/b]
Known now, you mean?
Just out of curiosity, is it fixed in 30.82?
Regards.
Eric