Index: [thread] [date] [subject] [author]
  From: Andrew Apted <ajapted@netspace.net.au>
  To  : ggi-develop@eskimo.com
  Date: Tue, 15 Sep 1998 10:57:13 +1000

Re: GT_2BIT?

Geert writes:

>  Amiga can do 1-8 bitplanes. Atari does 1/2/4/8/16 interleaved
>  bitplanes, NeXT has 2 bpp greyscale.

Right.

>  Even if you know that you have an 8 bpp screen, how do you know that it's
>  packed, bitplanes, interleaved bitplanes?

Normal LibGGI programs that just use the primitives (ggiMapColor,
ggiDrawBox) don't care.  The layout is hidden and can be ignored.

Programs that want direct access to the framebuffer will use
DirectBuffer (ggiDB* functions), where the layout is exposed by the
ggi_directbuffer structure.

>  And then I'm not talking about
>  endianness (e.g. packed 4 bpp is 2 pixels in 1 byte: AB or BA?).

There is reverse endianness, specified by xxx_REVERSE_ENDIAN flags in
various places, and reverse bit-order with a xxx_HIGHBIT_RIGHT flag.

This last flag also affects 2 bpp and 4 bpp modes (where `BIT' means
`pair' or `nibble' respectively).  So for packed 4 bpp, the buffer
format is AB when that flag is clear, and BA when set.

>  Sorry if my comment is silly, I don't look at all the KGI internals.

Well the above applies to LibGGI.  The current KGI doesn't really handle
normal bitplanes and interleaved bitplanes etc.  It theoretically could,
but there's no easy way to find out the layout.  What would happen is
LibGGI would ask the driver (via ioctl) for the names of the DLLs to
load, and the driver might return something like "generic-iplanar-2p".

Cheers,
_____________________________________________  ____
                                               \  /
  Andrew Apted   <andrew@ggi-project.org>       \/
  

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