glGetIntegerv( GL_TEXTURE_2D_BINDING_EXT, &activeTextureID);
assert( glGetError() == GL_NO_ERROR );
if( activeTextureID != glTextureID) // glTextureID is an int
{
GLint a;
glEnable( GL_TEXTURE_2D );
assert( glGetError() == GL_NO_ERROR );
//assert( glIsEnabled( GL_TEXTURE_2D ) == GL_TRUE); // fails!
glBindTexture( GL_TEXTURE_2D, (GLuint)glTextureID);
assert( glGetError() == GL_NO_ERROR );
glGetIntegerv( GL_TEXTURE_2D_BINDING_EXT, &a);
//assert( a == glTextureID ); // nope, should be
if ( glIsTexture( (GLuint) glTextureID) == GL_TRUE) // nope, should be
I am running Windows XP Home on a Dell Inspiron 5150 laptop with a
Mobile radeon 9000, and compiling with VC++6 and linking against the MS
OpenGL DLLs.
Is there some way I might have screwed up these simple query functions?
I will look for other ways to debug, meanwhile.
kenny
--
Cells? Cello? Celtik?: http://www.common-lisp.net/project/cells/
Why Lisp? http://alu.cliki.net/RtL%20Highlight%20Film
> Is there some way I might have screwed up these simple query functions?
>
DO you have an active render context?
--
<\___/>
/ O O \
\_____/ FTB. For email, remove my socks.
Governments, like diapers, should be changed often,
and for the same reason.
fungus wrote:
> Kenny Tilton wrote:
>
>> Hi, just a newby here. i am trying to debug some odd behavior with
>> textures but when I tried using glIsEnabled to validate things
>> (GL_TEXTURE_2D, in fact) it seems to be giving me bogus results:
>
>
>> Is there some way I might have screwed up these simple query functions?
>
>
> DO you have an active render context?
Doh! Nope. Thanks. I have this declarative hack which initializes things
at its own discretion. I have now modified that to make sure the OpenGL
stuff does not get touched unless the right render context is active.
The query functions now work as expected, and some of the odd texture
behavior has gone away. Not all, but now at least I will be able to
debug more easily.
Thx again, kenny