Archived

This topic is now archived and is closed to further replies.

frankd

2D sprite z-buffering

Recommended Posts

I''m drawing 2D sprites using an orthographic projection matrix in dx8, but I can''t get the z-buffering to work. I''ve enabled z-buffering, but whatever z values I give sprites, the more recently created sprites appear on top of ones created before them. Is there something I''ve missed or doesn''t the z value work with an orthographic projection? thanks

Share this post


Link to post
Share on other sites
Ortho as far as I know (I use Opengl) does not have a Z buffer when you use ortho its 2d so therefore whatever you draw last will appear on the top and whatever you draw first will appear underneath

Share this post


Link to post
Share on other sites