🎉 Celebrating 25 Years of GameDev.net! 🎉
Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!
urgent help required!!!
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
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.
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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement