Help - glBindTexture() disables texturing!

Does anybody know why glBindTexture() can cause texturing to be disabled?
I’d specified my texture(proper pow of 2 dimensions without mipmaps) as usual with glTexImage2D() and called glTexParameteri() to set the minification filter option to 1 of the non-mipmapped ones.
Everything worked fine until I decided to bind the current texture to an ID(say 1) with glBindTexture()…texturing just got disabled!
I didn’t get any error messages by way of glGetError()…so what gives?

Grateful for any pointer or help, anyone!

maybe the part of code in which you generate and use the texture would be helpful…

maybe the part of code in which you generate and use the texture would be helpful…

Right, here’s the code snippet that does just that…

GLfloat tex[64643]; //64x64 RGB texels
for(int pix=0;pix<(6464);pix++)
{
tex[pix
3]=1.0;
tex[pix3+1]=1.0;
tex[pix
3+2]=0.0;
} //set all texels to bright yellow
glTexImage2D(GL_TEXTURE_2D,0,GL_RGB,64,64,0,GL_RGB,GL_FLOAT,tex);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR);
glBindTexture(GL_TEXTURE_2D,1); //if this is disabled, texturing works…else, texturing is disabled!

Any idea what’s wrong? I haven’t been able to figure out what could possibly be wrong…

do u also have a MAG filter + WRAP_S + T set.
i know leaving some of those out will cause the image not to work

You’ve got it backwards. You call glBindTexture first, then you make texture calls (like glTexImage2D or glTexParameter). These are all pre-processing steps.

When you are ready to use the texture, you just call glBindTexture with that particular texture identifier, and that texture, with all of its texture state that you set before, will become active.

What you’ve done here will essentially negate the calls to glTexImage2D and glTexParameter.

Thanks Korval…I got it now!