Jump to content
  • Advertisement
Sign in to follow this  
c0uchm0nster

OpenGL Texture mapping works winxp, linux, not osx

This topic is 3989 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'm working with a team on an opengl cross-platform side scroller. We're loading in a bmp with fopen/fread. Grabbing the width/height fine, bpp and planes to a struct. Then we fseek to the data and fread in width * height * 3 bytes 1 time for the data. Basically, this method works perfectly on both windows and linux, but when we try to compile and run our app on mac we just get a white gl_quad. The file opens fine/without error so we're struggling to figure out what's up and we thought we'd ask here to see if there's any known issue with this method on osx (g5 based) before we get too deep into debugging. Thanks.

Share this post


Link to post
Share on other sites
Advertisement
Just applying a texture to a quad sounds to simple to be a bug.
If it was a bug, then other games would show the same behavior. Try some of the samples from the red book to see.

Share this post


Link to post
Share on other sites
I think pointer hit your problem on the head. I'll leave this netrino article to explain about endianness -- no sense in regurgitating something that is already written down :)

Meanwhile, while we're on regurgitating things -- while writing an image loader is good practice...there are libraries to help you do this. I like DevIL, though it is licensed under LGPL which may not suit your purposes.

hth,

~Shiny

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!