From 7e4152f0ed46f644a4247444e18dc7ad6c9832b0 Mon Sep 17 00:00:00 2001 From: Sean D'Epagnier Date: Fri, 18 Aug 2006 10:38:15 +0000 Subject: 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) --- src/glut/fbdev/colormap.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'src/glut/fbdev/colormap.c') diff --git a/src/glut/fbdev/colormap.c b/src/glut/fbdev/colormap.c index 157296d15c..4c013c7646 100644 --- a/src/glut/fbdev/colormap.c +++ b/src/glut/fbdev/colormap.c @@ -100,8 +100,21 @@ void LoadColorMap(void) /* we're assuming 256 entries here */ int i; + switch(VarInfo.bits_per_pixel) { + case 8: + case 24: + case 32: + ColorMap.len = 256; + break; + case 15: + ColorMap.len = 32; + break; + case 16: + ColorMap.len = 64; + break; + } + ColorMap.start = 0; - ColorMap.len = 256; ColorMap.red = RedColorMap; ColorMap.green = GreenColorMap; ColorMap.blue = BlueColorMap; -- cgit v1.2.3