On 1999/Oct/05, Jos Hulzink 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; };

        It's very easy to the application to have kgi_3dvertex into his own
vertex struct, so, when filling kgi_3dtriangle, only 3 copys will be made,
because it isn't needed at all to fill the kgi_3dvertex.

        And... int? Aren't there cards that use float?

-- 
"The artifficial intelligence will never exceed the natural stupidity" 
                                                             Santiago Souto
  _
 /_) \/ / /  email: mailto:[EMAIL PROTECTED]
/ \  / (_/   www  : http://programacion.mundivia.es/ryu
[ GGL developer ] & [ IRCore developer ] & [ GPUL member ]

Reply via email to