Re: [AD] 4.9.20

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


On Mon, May 17, 2010 6:41 am, Evert Glebbeek said:
> Oh, here's another one: the second colour representation struct in the primitives addon.
> I'd still like to get rid of that by either changing things internally in the primitives addon so
> we don't need it, or by merging it with Allegro's own colour struct. Whichever is more
> convenient/gets the most votes.
> Having two different data types for essentially the same thing looks like a design flaw in the
> API.

ALLEGRO_VERTEXs hold the raw data exactly as it is passed to GL or D3D. I'm not sure, only
Paul would know, but I don't think we can represent the color in D3D as anything but a
32 bit int. Which means we either make ALLEGRO_COLOR a 32 bit int (not a good option)
or we convert to 32 bit int for each vertex (IMO, also not a good option). With a custom vertex
format you should be able to use a ALLEGRO_COLOR equivalent in your vertex format. But
as a default I don't think changing it is a good idea if we have to convert all data to a different
format. There will be cases (are cases, if you count my game) where thousands of vertexes
are drawn all at once at a high frame rate. That conversion is going to kill performance more
that I'd accept.

Trent :{)>




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