Index:
[thread]
[date]
[subject]
[author]
From: Sengan Baring-Gould <sengan@seqnet.net>
To : ggi-develop@eskimo.com
Date: Wed, 19 Aug 1998 20:54:01 -0600
Re: LibGGI3D RFC
Jon M. Taylor wrote:
> Next is the notion of pluggable shaders. A triangle is drawn by
> setting a bunch of pixels. What shade those pixels are can be determined
> in a huge number of different ways. LibGGI cannot possibly avoid bloat if
> it has to know about all those ways to shade triangles. Therefore,
> DrawTriangle can take a pointer to a shader table entry, which contains a
> pointer to a shader function. Thus, the code using LibGGI3D can implement
> arbitrary shaders and LibGGI3D doesn't need to know about the gory
> details. Both prebuilt shader functions (SHADE_PHONG,
> SHADE_GORAUD_TEXURED, SHADE_FLAT, etc) and user-defined shader functions
> go in this table. The prebuilt shaders allow DrawTriangle() to use
> hardware shading if it is present, or fall back to software shading if it
> is not.
What about texture mapping, etc. Something like Enlightenment/Gtk with
themeswould do well to use this. Also assigning gart space is definitely a GGI
kernel
level thing.
> * struct camera { float x1, y1, z1, x2, y2, z2 }. Every LibGGI3D display
> will have a camera struct attached to it. A generic hook for arbitrary
> display data should also be present - the shaders might use it. void
> *private_data.
> * int DrawTriangle (float x1, y1, x2, y2, x3, y3; shader_index shader; void
> *shader_data) is the core drawing function.
These lines seem to contradict: 2D triangles but 3d camera?
> Q: What about z-buffering? You said you were going to make that part of
> the API.
>
> A: I changed my mind. Once you start worrying about buffers, their
> dimensions, their layout, their coordinate system, etc etc you open up a
> whole can of worms. If people want these features, they can either write
> a DirectBuffer equivalent or draw to a secondary depth buffer. LibGGI3D
> is for drawing only. Extra stuff should have its own API.
I disagree. Z-buffers are in the hardware: the card gets a triangle in
3spaceand draws it to 3space.
But I can see you OpenGL point. Keeping it simple is good.
Sengan
Index:
[thread]
[date]
[subject]
[author]