views:

83

answers:

3

I'm trying to get a fullscreen 8 bit depth framebuffer but I can't find any visual to work with. I want 8 bit truecolor, where 3 bits are red, 3 bits are green and 2 bits are blue. I'm using XF86 to go fullscreen.

// pass
int found = XMatchVisualInfo(l_display, l_screen, 24, TrueColor, &visual);

// all of these fail
found  = XMatchVisualInfo(l_display, l_screen, 8, StaticGray, &visual);
found  = XMatchVisualInfo(l_display, l_screen, 8, GrayScale, &visual);
found  = XMatchVisualInfo(l_display, l_screen, 8, StaticColor, &visual);
found  = XMatchVisualInfo(l_display, l_screen, 8, PseudoColor, &visual);
found  = XMatchVisualInfo(l_display, l_screen, 8, TrueColor, &visual);
found  = XMatchVisualInfo(l_display, l_screen, 8, DirectColor, &visual);

Is this not possible or am I doing something wrong?

+2  A: 

That's a rather ... niche display mode. It's not at all certain that your X server, or even the underlying hardware, even supports it.

It can of course be emulated, but perhaps there's no such code (again, since it's a niche mode).

I don't think merely requesting a visual will cause X to switch modes, either.

unwind
A: 

That's just MCGA or VGA in 256-colour indexed mode with a palette that matches your specification.

You shouldn't have any trouble setting that up, 256-colour was historically a popular mode.

Alex Brown
A: 

You can try using xdpyinfo to view the available visual id configuration.

epatel