I use the code below (really standard one):
makeTexture(); // here pixel colors are calculated
glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_DECAL);
glTexImage2D(GL_TEXTURE_2D, 0, 3, width, height,
0, GL_RGB, GL_UNSIGNED_BYTE,
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:
1) Incorrect texture dimensions
2) Errors after texture-related GL function calls (glGetError says it's OK).
3) 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.