I\'m trying to figure out texture mapping in OpenGL and I can\'t get a simple example to work.
The polygon is being drawn, though it\'s not textured but just a soli
In addition to mentat's note that you might have a problem with non-power-of-two texture dimensions, you mention the texture name generation not changing the name.
That sounds as if you're calling glGenTextures()
too early, i.e. before initializing OpenGL. If you're not, then I suggest adding code just after the call to glGenTextures()
that check the OpenGL error state, by calling glGetError()
.