PDA

View Full Version : Weird display results when porting an application from x86


meeuw
2005.04.14, 04:26 PM
For school we are programming a 3D game, It's still at a development state and I've tried (with success) compiling it in Mac OS X (10.3.8).
All things go well except the textures are totally messed up, while moving the camera the draw order is a complete mess.
On the following URL you can see what's wrong, the barrel on the top is totally wrong, the bakery is messy and the (milk) cart has several failures. The strange thing is it's all fine on Linux and Windows (on a x86 machine). And I believe I've swapped all relevant to the right endian, I suspect a silly opengl bug (in our code).
Could someone please help?

http://oege.ie.hva.nl/~marinu04/Afbeelding%202.pdf

and for who's interested in our project:
http://gameplayheroes.blogspot.com/

OneSadCookie
2005.04.14, 05:18 PM
looks like a depth buffer error to me... try reducing the ratio of far distance to near distance (ie pull the far plane in, or push the near one out).

if you're only requesting a 16-bit Z buffer, you might like to ask for 24.

meeuw
2005.04.14, 05:46 PM
thanks! indeed, I was only requesting a 16 bit buffer, setting it to 24 helped:
SDL_GL_SetAttribute( SDL_GL_DEPTH_SIZE, 24 );

I'm wondering why this isn't a problem on other platforms

Fenris
2005.04.14, 05:59 PM
I've had this happen before. SDL supposedly requests an alpha depth to match the display depth (for some reason). To be sure, perhaps you should sync back with the rest of the team and tell them to request 24 explicitly, because if someone runs the game with 16 bit set on their monitor, it will be very unpretty. :)