From: ovek AT arcticnet DOT no (Ove Kaaven) Newsgroups: comp.os.msdos.djgpp Subject: Re: Allegro 2.2 question Date: Wed, 02 Apr 1997 11:26:37 GMT Organization: Vplan Programvare AS Message-ID: <5hv36k$i1q$1@troll.powertech.no> References: <01bc3c5c$e0867fe0$LocalHost AT default> <1bP+REAJoVQzEwjB AT talula DOT demon DOT co DOT uk> NNTP-Posting-Host: alwayscold.darkness.arcticnet.no Lines: 18 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Shawn Hargreaves wrote: >and in situations where you are sharing a single vertex between multiple >polygons (very common in most 3d engines), it is more efficient to take a >separate pointer to each vertex than to require them to be copied to >contiguous locations in a temporary buffer. With anything other than wireframe or smooth objects, I disagree. Even though the vertex world coordinates are the same, the color and texture positions will be different for each polygon. And what about 3D clipping, where the endpoint coordinates will be different for each edge, and the vertex data can't be used directly? I found it better to copy clipped world coordinates into a V3D_f array, insert color and texture positions, and then pass this array to polygon3d_f. However, with your design, I had to make an array of pointers to the V3D_f elements in the other array. Wasteful indirection.