Path: chuka.playstation.co.uk!news From: "Craig Graham" Newsgroups: scee.yaroze.beginners Subject: Re: GpuPacketArea query. Date: 29 Jun 1998 10:51:46 GMT Organization: PlayStation Net Yaroze (SCEE) Lines: 29 Message-ID: <01bda34b$a5fc6c20$f30b0a0a@Angela1.intelligent-group.com> References: <35557807.6E248247@chowfam.demon.co.uk><3558DF85.7C89DA42@ndirect.co.uk> <3559D87E.D5C1EBD1@chowfam.demon.co.uk><3594C013.116@manc.u-net.com> NNTP-Posting-Host: d1-s42-83-telehouse.mistral.co.uk X-Newsreader: Microsoft Internet News 4.70.1155 Toby Hutton wrote in article ... > James Shaughnessy writes: > > > PS I still use the old formula for packet space: > > PACKET GpuPacketArea[2][NUM_SPRITES*sizeof(GsSPRITE)]; > > "sizeof(GsSPRITE)" is a macro unless I'm very much mistaken. > > sizeof is actually a C operator, and GsSPRITE is a struct. You can > use sizeof with any variable or data type to return its size. > > If you're doing 2D only with sprites then NUM_SPRITES * sizeof > (GsSPRITE) would work fine. A packet can be other things though, like > a poly or line which are different sizes, perhaps larger than > GsSPRITE, so you need to make sure you reserve plenty of space. That's not quite true, as a GsSPRITE when entered using GsSortSprite() (as opposed to GsSortFastSprite) actually generates the same type of GPU packet as a texture mapped Quad (different front end to the same low-level primitive). > Toby. Craig.