Jump to content
  • Advertisement
Sign in to follow this  
Gor435

OpenGL images problem

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

I have been trying to figure out how to display images and use textures in opengl well I have come across a little problem. This is what I get Image hosted by Photobucket.com This is what it should look like Image hosted by Photobucket.com Is this a common problem? If so how do I fix it. btw if you guys want code I will provide it but I will let you know it is just me messing around trying to get it to work. Not very pretty.

Share this post


Link to post
Share on other sites
Advertisement
Is this a standard textured quad? I ask because there is a size difference between the two images.

The first gotcha is your color. If you are using GL_RGB, try using GL_GRB, or whatever. But reverse the green and red componants. ALl you have to do is change the little enum constant when you create the texture.

Share this post


Link to post
Share on other sites
see that is what I get with glDrawPixels() when I try to texture map it onto a rectangle it simply gives me a white rectangle no image.

Share this post


Link to post
Share on other sites
i had a similar problem with a TGA loader i was using, it didnt support the type of tga i was trying to load giving me odd colours and stuff. might wanna check if ure loader is supporting all the different types of headers and formats. hope this helps

si

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!