mirror of
https://github.com/DrBeef/ioq3quest.git
synced 2024-11-12 23:54:07 +00:00
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.
This commit is contained in:
parent
d47be89f0a
commit
842f27818b
1 changed files with 8 additions and 0 deletions
|
@ -337,6 +337,14 @@ static int GLimp_SetMode( int mode, qboolean fullscreen )
|
||||||
if (tcolorbits == 24)
|
if (tcolorbits == 24)
|
||||||
sdlcolorbits = 8;
|
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_RED_SIZE, sdlcolorbits );
|
||||||
SDL_GL_SetAttribute( SDL_GL_GREEN_SIZE, sdlcolorbits );
|
SDL_GL_SetAttribute( SDL_GL_GREEN_SIZE, sdlcolorbits );
|
||||||
SDL_GL_SetAttribute( SDL_GL_BLUE_SIZE, sdlcolorbits );
|
SDL_GL_SetAttribute( SDL_GL_BLUE_SIZE, sdlcolorbits );
|
||||||
|
|
Loading…
Reference in a new issue