Index: [thread] [date] [subject] [author]
  From: Jan Kneschke <Jan.Kneschke@kiel.netsurf.de>
  To  : ggi-develop@eskimo.com
  Date: Mon, 26 Jul 1999 23:20:22 +0200 (CEST)

Re: Xblit 1 -> 16 on X

On Mon, 26 Jul 1999, Andreas Beck wrote:

> Hi !
> 
> > i wanted to draw a connection between Freetype and GGI. As we all know,
> > Freetype render its letters into a bitmap (display-memory).
> > 
> > ggiCrossBlit(memvis,0,0,m.virt.x,m.virt.y,vis,0,0);
> > sadly the crossblit displays nothing. ( 1 -> 16bpp on X)
> > am i doing something wrong or is no x-blit 1->16 available ??
> 
> O.K. - check the following out:
> 
> 1. What happens if you ggiGetPixel through the 1BPP visual ? Does it show
> two different values (should be 0 and 1) ? If not, something is wrong with
> the getpixel routine thus screwing the XBlit.
yes. getpixel gave me two values (0, 1).

> 2. If 1. works, check what UnmapPixel does to it. It might be, that that
> 1BPP mode is considered to be palletized thus turning out to have two kinds
> of black called 0 and 1.
both gave me {0,0,0} :(

> 3. If both 1. and 2. work right, send me the code. I'll try to track it,
> then.
> 
> If it's 1. failing we need to hunt the bug down. 
> If it's 2. we should think
> about giving a reasonable default palette, especially on memvisuals.
how to set this palette ?? 

btw: my 'XBlit' is now the following:
		col.r = col.b = col.g = 0xffff;
		ggiSetGCForeground(vis,ggiMapColor(vis,&col));
		
#if 0
		if (ggiCrossBlit(memvis,0,0,m.virt.x,m.virt.y,vis,0,0)) {
			printf("OOOOOOOOOOOOO\n");
		}
#else
		for ( i = 0; i < m.virt.y; i++ ) {
			int j;
			for (j = 0; j < m.virt.x; j++) {
				ggiGetPixel(memvis,j,i,&p);
				if (p) {
					ggiDrawPixel(vis,j,i);
				}
			}
		}
#endif

 
> CU, Andy
> 
> 


thats all
  Jan

--- 
       Project: GGI - S3-Vision-driver -- http://www.ggi-project.org/
         -)=  Jan (Weigon) Kneschke -- Kiel -- Northern Germany =(-

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