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: it
returns GL_FALSE (0) even when the texture rendering is working. I get
this also from glGetBooleanv using that mechanism. I also get GL_FALSE
from glIsTexture on working texture IDs. Here is a code snippet:
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