[quake3-commits] r1604 - trunk/code/sdl
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Mon Sep 14 21:01:07 EDT 2009
Author: icculus
Date: 2009-09-14 21:01:07 -0400 (Mon, 14 Sep 2009)
New Revision: 1604
Modified:
trunk/code/sdl/sdl_glimp.c
Log:
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.
Modified: trunk/code/sdl/sdl_glimp.c
===================================================================
--- trunk/code/sdl/sdl_glimp.c 2009-09-15 00:53:02 UTC (rev 1603)
+++ trunk/code/sdl/sdl_glimp.c 2009-09-15 01:01:07 UTC (rev 1604)
@@ -337,6 +337,14 @@
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 );
More information about the quake3-commits
mailing list