On Tue, 5 Oct 1999, Andreas Beck wrote:

> 
> > > 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.

Which call ? :)

> 
> >     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. 

ViRGE uses some fixedpoint 16 bit value, that's all I know... The format
of this fixpoint value can be modified though (if anyone can tell me the
use of this...) so you can call it floating point :)

> However most cards allow for fixedpoint, as this is how they work
> internally. Would 16.16 fixedpoint be o.k. ?

Well... All I can say is that on my ViRGE I'd have to drop the fractional
part of the Z value, and create a signed fixpoint value of the integer
part... Still thinking if this would have consequences besides loss of
resolution. I know... I should buy another videocard... :)

Jos

Reply via email to