Jump to content
  • Advertisement
Sign in to follow this  
dj357

urgent help required!!!

This topic is 4133 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!