Archived

This topic is now archived and is closed to further replies.

texturing is not working

This topic is 5778 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

Hi, I am trying to draw a quad with a texture. I load in the TGA file (I have traced through this thoroughly and i think it works fine) then generate a texture id, bind it and call glTexImage2D. When I later try to draw with that texture and bind it, I get a white rectangle. I DO glEnable (GL_TEXTURE_2D) i have compared my code to NeHe tutorial and I DO follow all the steps they do. I have looked through Quake2 source code and i DO follow the steps Carmack does. In the end, the texture does not show up. glColor3f (...) turns the wuad any color i want, but no luck with the texture. What can I be missing? I tried glGetError () at different palces and neither bind nor glTexImage2D ever set the error to anything other than 0. Any clues? -Alexey.

Share this post


Link to post
Share on other sites
Try to load BMP and use it..If it will work,then you have error in TGA loading code, else you shoudl check the rendering code.This is not an answer,but it would help...

Share this post


Link to post
Share on other sites