[AD] Z-buffer API

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Hello,
In the new z-buffer API, you initialize z-buffering by
doing:

   create_zbuffer(bmp);

This sets up a global zbuffer which is private to
Allegro, ie. the user of Allegro can't access it.
Wouldn't it be better if you had to do:

   ZBUFFER *zbuf;
   zbuf = create_zbuffer(bmp);
   set_zbuffer(zbuf);

? The difference is that you can have several
z-buffers around at the same time. This gives more
freedom to the programmer, and could be much more
efficient for people who use more than one z-buffer
(eg in a split-screen game). AFAICS the changes would
be easy to do, and I'd be happy to code it if everyone
agrees. (I thought I'd better mention this before the
API freezes at 3.9.34.) Also, the current code does
the assumption that sizeof(int) == sizeof(float)
(since the z-buffer is stored in a 32 bit bitmap); is
this true on all platforms? 

Sven

__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - Buy the things you want at great prices. 
http://auctions.yahoo.com/



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/