gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

DS development > more ortho problems

#76884 - MrK - Sat Mar 25, 2006 8:38 pm

now that the sorting issue has been fixed, I'd like to share some problems that I'm having when using glOrtho, I'd love to know if other people using glOrtho are also experimenting the same problems, or it's just me / my engine


* it seems to be a very low range of z values, something like between 0 and 128, no matter what values I put in the z department of the glOrtho call

* it seems when two tiles share the same z, they're sorted in a funky way:
- if the starting Y is different, then the lowest Y is printed first (kinda stupid but I can live with it)
- if the starting Y is the same, then the smallest y-sized tile is printed first (really really stupid, I hope my engine is wrong otherwise this sucks!)

#76897 - MrK - Sat Mar 25, 2006 11:20 pm

well, second point seems to be the way it works, so the only solution is playing with zbuffer values to avoid the problem.

the low zbuffer range was due to a glTranslate bug (in fact there were lots of zbuffer values, just that most of them were negative)