Depth sorting issues with SGX


I’m trying to get a game that is written for GL ES 1.1 working on the Beagleboard which uses a SGX 530 PVR graphics part.
The problem I’m having is that while the game looks fine using the GLES emulator in XP, the depth sorting looks all wrong when running on the Beagleboard. Some distant objects are getting rendered in front of close objects and in some cases close objects are getting polygons missing.
I found something in the FAQ suggesting to invert the depth range which I tried to no avail.
My depth range is 0.2 -> 2500. My guess is it needs to be formatted into something more PVR friendly.
In my experience depth sorting on PVR parts is always a bit quirky but the quirks never seem to be very well documented.

Has anyone else had problems like this or could point me in the direction of a solution.



The 'quirkiness' of PVR depth sorting is not well documented simply because it is not quirky: It works and behaves as any other depth buffer, it is just more effective.

The problem you are seeing is very strange and it might be caused by depth buffer precision although I really doubt it from your description above.

I believe this might be a case where PCEmulation is not reflecting properly OpenGL ES 1.1 (e.g. you have forgotten to set something which has a different default on desktop OGL and PCEmulation is not catching it)

If you send us a little example showing this problem to we will investigate it.




Thanks for the reply.
I’ve found the problem. I was using an EGL config with no depth buffer, silly me!