Sign in to follow this  
dj357

urgent help required!!!

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
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this