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.

        Yes.  See my other post where I propose the use of indexed command
buffering.
 
> 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 is not easy to do cleanly without KGI 0.9.  However, if
we support Direct3D Immediate Mode and OpenGL as I proposed in another
post, we will have supported the hardware interfaces of all chipsets which
are newer than a year or so, and for the forseeable future (OpenGL).

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

        Savage4 supports 32-bit IEEE-standard floats, as well as
fixed-point with a variable mantissa.  I think most newer HW supports at
least 32-bit IEEE floats.  This is not for geometry, it is to avoid
translation costs from the native API (D3D IM).
 
> However most cards allow for fixedpoint, as this is how they work
> internally. Would 16.16 fixedpoint be o.k. ?

        As long as the field's bit length is the same and no massaging of
the data is done by the driver, it should not matter what the internal
representation is.

Jon

---
'Cloning and the reprogramming of DNA is the first serious step in 
becoming one with God.'
        - Scientist G. Richard Seed

Reply via email to