Advertisement Jump to content


This topic is now archived and is closed to further replies.


OpenGL Setting OpenGL color sizes

This topic is 5754 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post

Link to post
Share on other sites
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]

Share this post

Link to post
Share on other sites
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.

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!