Index: [thread] [date] [subject] [author]
  From: Marcus Sundberg <e94_msu@elixir.e.kth.se>
  To  : ggi-develop@eskimo.com
  Date: Tue, 18 Aug 1998 04:06:25 +0200

Re: 3d

> > If you are talking about the DirectBuffer system in libggi it's ready
> > to handle any buffer you can possible imagine.
> > And requesting Z-buffers doesn't belong in the core libggi, that's
> > stuff that belong in some extension.
> 
> Ah - but it has to be -requested- from the hardware.  sometimes.  Most of
> the time you're just requesting a buffer of "x" size inside of videoram.
> Some cards might impose a restriction on where that buffer can be (ie:
> only on 8-byte boundary). Some cards may only allow certain kinds of
> buffers or have flags on buffers to provide special acceleration - say
> Z-buffer, bitmap, alpha-buffer, MPEG/YCbCr buffer, ...
> 
> Is -THAT- handled by libGGI?
> (that's the part that matters)
>
> Sending graphics commands (ie ggiDrawPixel with Z-buffer) should be in an
> extension though - such as a Z-buffer extension of GGI2D.
> 
> Last I looked the basic buffer-request code didn't exist.  Does it now?
> (I've really lost track of what's present in libGGI)

Well, IMHO requesting offscreen buffers (both 2d and 3d) should go
into an extension to keep libggi as lightweight as possible.
Most applications will just want a framebuffer to draw in anyway.

But you seem to be under the common but wrong impression that
an extension is something that sits on top of libggi and add
higher level functions - it's not.
An extension rather sits _beside_ libggi and adds functionality
to the core libggi. An extension has access to all internal data-
structures of libggi, may load target-specific libraries for
that particular extension, may override existing functions
to extend their functionality, and certainly may interface the
hardware directly.

> Incidentaly - the above mechanism would work great for setting up the
> secondary window-support on the S3-Trio64V+ and above series cards
> (including ViRGE et al) for overlapping displays and other special
> effects. This is all nice 'n all but where would I setup the secondary
> window?  And where would I add an extension for
> multi-display-on-same-screen support?  (suggestions? :)
> This one I'll code right away as soon as I see how....

Please have a look at the misc extension in lib/libggi/extensions/misc
to see how to write an extension that provides an API to lowlevel
hardware functions. (I'd be happy to test your extension on my
other box that has a Virge board btw ;)

//Marcus

Index: [thread] [date] [subject] [author]