diff options
author | Sean D'Epagnier <[email protected]> | 2006-08-18 10:38:15 +0000 |
---|---|---|
committer | Sean D'Epagnier <[email protected]> | 2006-08-18 10:38:15 +0000 |
commit | 7e4152f0ed46f644a4247444e18dc7ad6c9832b0 (patch) | |
tree | e281f83eff5b387fa4a92d81ced80c91716e0899 /src/glut/fbdev/cursor.c | |
parent | bd87c303e94659941a7c623d0b836e3ff317cfb4 (diff) |
The driver now compiles correctly without any x headers or libraries installed
The bitmap and stroke code can't be shared with glx anymore because of this.
The model for the mini teapot is restored and I have tested it to work with
linux-fbdev and linux-solo
The driver recognizes 32bpp where there is no alpha (my radeon 7500) It also
sets the correct number of cmap entrees (instead of 256 which can be an error)
Diffstat (limited to 'src/glut/fbdev/cursor.c')
-rw-r--r-- | src/glut/fbdev/cursor.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/glut/fbdev/cursor.c b/src/glut/fbdev/cursor.c index 06ae2d6f54e..e7fb00f46ff 100644 --- a/src/glut/fbdev/cursor.c +++ b/src/glut/fbdev/cursor.c @@ -163,7 +163,8 @@ void DrawCursor(void) cstride /= 2; for(i = yoff; i < ylen; i++) { for(j = xoff; j < xlen; j++) { - e[0] = ((((d[0] + (((int)(((e[0] >> 8) & 0xf8) + if(d[3] < 220) + e[0] = ((((d[0] + (((int)(((e[0] >> 8) & 0xf8) | ((c[0] >> 11) & 0x7)) * d[3]) >> 8)) & 0xf8) << 8) | (((d[1] + (((int)(((e[0] >> 3) & 0xfc) | ((e[0] >> 5) & 0x3)) * d[3]) >> 8)) & 0xfc) << 3) @@ -181,9 +182,11 @@ void DrawCursor(void) case 4: for(i = yoff; i < ylen; i++) { for(j = xoff; j < xlen; j++) { - c[0] = d[0] + (((int)c[0] * d[3]) >> 8); - c[1] = d[1] + (((int)c[1] * d[3]) >> 8); - c[2] = d[2] + (((int)c[2] * d[3]) >> 8); + if(d[3] < 220) { + c[0] = d[0] + (((int)c[0] * d[3]) >> 8); + c[1] = d[1] + (((int)c[1] * d[3]) >> 8); + c[2] = d[2] + (((int)c[2] * d[3]) >> 8); + } c+=bypp; d+=4; |