Path: chuka.playstation.co.uk!scea!greg_labrec@interactive.sony.com From: Pradip Fatehpuria Newsgroups: scea.yaroze.programming.2d_graphics Subject: Re: question about packet Date: Tue, 26 Aug 1997 14:54:58 -0700 Organization: Sony Computer Entertainment America Lines: 24 Message-ID: <340350B2.60DC@interactive.sony.com> References: <33F2707B.41C67EA6@cpsc.ucalgary.ca> NNTP-Posting-Host: 206.41.6.40 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 3.01Gold (Win95; U) Kin Lee wrote: > > Hi, > In the source code of the demo (the one in the red manual): > > "PACKET CpuPacketArea[2][MAXOBJECT*(20+4)]" > > Why (20+4) ? Why is it always a multiple of 24 ? > > Why not "PACKET CpuPacketArea[2][MAXOBJECT*sizeof(some_structure)]" ? > > > Kin Actually 4 bytes is the tag area in the packet and 20 bytes is the size of the largest possible primitive packet. So 20+4= 24 bytes per packet. You may use a smaller value than 20, like (n+4) where n is the size of the largest possible packet in your models. To be more accurate, you may calculate the largest possible memory block taken by all primitives in your world and use that area as the GS packet area. Pradip K Fatehpuria