urgent help required!!!

Started by
0 comments, last by Kazade 17 years, 1 month ago
can somebody pleases help me out?!?! i've been wracking my brain for ages and I just can't figure out how to apply a texture to NeHe's ArcBall, it just goes gray on me. Can anybody help me out? I'm a newbie OpenGL programmer but I really need to make this work
"In meinem Himmel, gibt's keinen Gott!!" - Till Lindemann
Advertisement
Hey,

Without seeing your code it is difficult to know whats going wrong, but here are a few things to check:

1. Make sure that the texture is definitely being read and loaded from disk (e.g. that the image file is in the right place)
2. Make sure that you don't call glGenTextures before the OpenGL context has been created. I'm basically saying don't try to load textures before CreateWindow has finished.
3. Make sure you specify texture coordinates for every vertex on every textured shape you are drawing (using glTexCoord2f calls).
4. Make sure you call glEnable(GL_TEXTURE_2D); before drawing your object.

If none of those help ya, try posting your code in [ source ] tags.
Member of the NeHe team.

This topic is closed to new replies.

Advertisement