Setting OpenGL color sizes

Started by
2 comments, last by BradDaBug 21 years ago
I''m using OpenGL and SDL. When I set the color depth to 32 bit and set the color sizes like this: SDL_GL_SetAttribute( SDL_GL_RED_SIZE, 8 ); SDL_GL_SetAttribute( SDL_GL_GREEN_SIZE, 12 ); SDL_GL_SetAttribute( SDL_GL_BLUE_SIZE, 8 ); I get a "Couldn''t find matching GLX visual" error (I''m in Linux, btw). When I change that 12 to an 8, it works fine. I don''t see why I couldn''t use 11, 11, 10 since that uses 32 total bits. And it''s in fullscreen mode so I dont see why the desktop res would matter at all. What''s wrong? Current Projects: GK3 for Linux | Landscape Engine | Bug Hunt
I like the DARK layout!
Advertisement
Typical supported formats:

RGB 888
RGB 565
RGB 555
ARGB 8888

EDIT: (must get out of the habit of posting really terse answers...)

The bit depths are hardware dependent. R8 G12 B8 is not supported on any hardware (AFAIK) so it's not surprising it fails. Stick with the standard formats and there will be no probs.

[edited by - JuNC on April 19, 2003 5:29:05 AM]
You mean 8 bits is the highest depth I''m going to get? Nuts. When will higher depths be available?
I like the DARK layout!
quote:Original post by BradDaBug
You mean 8 bits is the highest depth I''m going to get? Nuts. When will higher depths be available?


Yep, but 8 bits isn''t that bad, unless you make lots of passes in the frame buffer. MATROX''s Parhelia supports 10-10-10 frame buffer (with 2 bits for alpha). Radeon9700 and GeForceFX may support it too, but don''t quote me on this.

This topic is closed to new replies.

Advertisement