diff options
author | icculus <icculus@edf5b092-35ff-0310-97b2-ce42778d08ea> | 2009-09-15 01:01:07 +0000 |
---|---|---|
committer | icculus <icculus@edf5b092-35ff-0310-97b2-ce42778d08ea> | 2009-09-15 01:01:07 +0000 |
commit | fdc9cb96d517332168beaefd5731c5b150b56afb (patch) | |
tree | f86e8f56d5102e7ca5b26051a74efd4c606a5dea | |
parent | eeede6e3648b16f150ff5fe03cf610dff892cfe4 (diff) | |
download | ioquake3-aero-fdc9cb96d517332168beaefd5731c5b150b56afb.tar.gz ioquake3-aero-fdc9cb96d517332168beaefd5731c5b150b56afb.zip |
Fix SGI systems choosing an inefficient 36-bit color visual.
Now they'll choose 16 or 32 bit correctly with this magic.
Fixes Bugzilla #4245.
git-svn-id: svn://svn.icculus.org/quake3/trunk@1604 edf5b092-35ff-0310-97b2-ce42778d08ea
-rw-r--r-- | code/sdl/sdl_glimp.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/code/sdl/sdl_glimp.c b/code/sdl/sdl_glimp.c index 59c1e53..4804d31 100644 --- a/code/sdl/sdl_glimp.c +++ b/code/sdl/sdl_glimp.c @@ -337,6 +337,14 @@ static int GLimp_SetMode( int mode, qboolean fullscreen ) if (tcolorbits == 24) sdlcolorbits = 8; +#ifdef __sgi /* Fix for SGIs grabbing too many bits of color */ + if (sdlcolorbits == 4) + sdlcolorbits = 0; /* Use minimum size for 16-bit color */ + + /* Need alpha or else SGIs choose 36+ bit RGB mode */ + SDL_GL_SetAttribute( SDL_GL_ALPHA_SIZE, 1); +#endif + SDL_GL_SetAttribute( SDL_GL_RED_SIZE, sdlcolorbits ); SDL_GL_SetAttribute( SDL_GL_GREEN_SIZE, sdlcolorbits ); SDL_GL_SetAttribute( SDL_GL_BLUE_SIZE, sdlcolorbits ); |