On Tue, 7 Mar 2000, James Simmons wrote:
>
> > > I have been looking at Mesa-GGI and libGGI. Do you think it would be
> > > possible to add a triangle function?
> >
> > Yes, but the triangle function is added in an extension library
> > because the base LibGGI drawing functions are all basic 2D "essential"
> > primitives only. Currently the "triangle drawing" extension library which
> > most people use is of course GGIMesa, but LibGGI2D has triangle drawing
> > functions as well, and of course there is always LibGGI3D.
>
>
> Time to put GGImesa in standard tree or make a GGI3D extension?
*sigh*
I don't know which one refers better to how hardware's handled.
the nice thing about GGImesa is that just about all 3D-accels are heading
for OpenGL as basic hardware accel :)
> > > I'm interested in also setting up Z
> > > and alpha buffers. How would I go about doing that ?
> >
> > Depends on whether you are trying to simply allocate some RAM and
> > map it into a DirectBuffer, or whether you are trying to directly map a
> > hardware Z/alpha buffer. If the first is true, just use malloc() and look
> > at how e.g. the Glide target maps DirectBuffers, I think thats the best
> > example code for that. If the second is true and you are mapping a
> > hardware auxiliary buffer, you will either need to have a kernel driver
> > which can let userspace mmap() the physical aperture, or do some suid-root
> > /dev/mem mapping tricks like SVGAlib does.
>
> Neither. The SGI approach of not mmaping these buffers. I rather set a
> flag to tell the system to use a particular buffer. Sort of what you did
> in GGIMesa if I'm seeing it right.
Ohhh - well, let's see.
Z-buffer -> the 3D drawing code uses this. It'd be nice to be readable
from source-space for advanced drawing but not vital. And not available
on all H/W (from experience :)
Alpha buffer -> same deal.
Right.
Stencil buffer -> (2D clipping) - directbuffer (mmap)
Textures -> ... but prolly some global large buffer
an application could allocate chunks of texture buffer.
Or even better use ggi3D (or mesaGGI) to draw onto it. Letting the 3D lib
handle whether HW or SW and which accel to use.
(IIRC you'd use 3d triangle as basic primitive even when drawing lines or
points with S3 ViRGE - but could be wrong)
Feel free to disregard this whole message but please let me know if I'm
barking up the wrong tree?
G'day, eh? :)
- Teunis