Index: [thread] [date] [subject] [author]
  From: Andrew Apted <ajapted@netspace.net.au>
  To  : ggi-develop@eskimo.com
  Date: Thu, 13 Aug 1998 11:39:58 +1000

Re: LibGGI colormapping

Marcus writes:

>  > >  We should probably have some "altered range" fields too, like the
>  > >  X-targets do, so that targets can see when the palette has been
>  > >  changed, and what entries have been changed.
>  >
>  > I'm not following you here.  What exactly do you mean ?
>  
>  Look at this code from display/X/mode.c:

[SNIP CODE]

Ah a "dirty" region, I hadn't realized that any targets did this with
the palette.  Cool.

With the "generic-color" proposal, it is still the target that has to
implement GGIsetpalvec().  So X_common/color.inc's GGIsetpalvec() would
contain the

    if ( start     < xhook->cmap_first ) xhook->cmap_first = start;
    if ( start+len > xhook->cmap_last  ) xhook->cmap_last  = start+len;

code.

>  (hmm, maybe we should remove the "vec" from the internal names too,
>  for consistency :)

Go for it :).

BTW, can we guaranteed that LIBGGI_PIXFMT(vis) will be set up by the
target _before_ loading any sub-libraries (like generic-color) ?  I want
the GGIdlinit of generic-color to convert the pixel format masks (for
truecolor modes) into some shift values (stored in vis->colorpriv) so
that the generic ggiMapColor/ggiUnmapPixel (etc) will be fast.

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

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