glBindTexture(GL_TEXTURE_2D, texname);
drawPolygon(); // glTexCoord2 is used here in conjunction with glVertex
This code was inserted into a large visualization library. And it doesn’t work there. While it works well in a small standalone application. I checked the following possible problems:
Incorrect texture dimensions
Errors after texture-related GL function calls (glGetError says it’s OK).
Incorrect texture coordinates
It seems that everything is OK except that texture is not mapped!!! OpenGL monsters, do you have any ideas why? I work on TNT2 Pro under Win2k+SP3.
Ohhh …i see , it´s working well alone …
check if you´re not gatting into conflict with another texture unit ,that it´s not disabled and is not beeing used …for example
Try using gluBuild2DMipmaps() instead of glTexImage2D() OR don’t use mip maps (If you are only specifying Lvl 0 of your mip maps and any other level is used when drawing your geometry will result in the texture not being drawn.