> > struct kgi_3dtriangle {int x0,y0,z0,x1,y1,z1,x2,y2,z2};
> > Comments please !
> I don't like this kind of 3dtriangle at all, it needs 9 copies of
> data to draw a triangle, maybe it's insignificant when you must call later
> ioctl, which surely eats up more cpu. But when you implement multiple
> commands (one call for each triangle is very slow), it will be more
> significant. I would propose this alternative:
> struct kgi_3dvertex { int x,y,z;};
> struct kgi_3dtriangle { kgi_3dvertex *v0, *v1, *v2; };
The passing of pointers is undefined for KGI. It is not possible to
transparently pass pointers across protection ring boundaries.
Something similar would be possible, though by allowing a kind of "upload"
of a vertex array that is accessed by (numeric) indexes later on.
However I suppose the above call might be enough for the simple "common
ioctl" layer. If you want to be really fast, you will need a card-specific
communications layer anyway.
> And... int? Aren't there cards that use float?
Good point. I do not know about cards that use float. Should be pretty rare,
as floats are very expensive to handle and rarely needed, unless the card
has an internal geometry processor.
However most cards allow for fixedpoint, as this is how they work
internally. Would 16.16 fixedpoint be o.k. ?
CU, Andy
--
= Andreas Beck | Email : <[EMAIL PROTECTED]> =