Texture mapping works winxp, linux, not osx
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.
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.
If it was a bug, then other games would show the same behavior. Try some of the samples from the red book to see.
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
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
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement