Skip to content

Commit

Permalink
Fix multisampling on X11
Browse files Browse the repository at this point in the history
Setting SDL_GL_ACCELERATED_VISUAL was disabled for ioq3 SDL 1.2
for other reasons. However, it causes creating GL context to fail
if multisampling is enabled on X11 for both SDL1.2 and SDL2.

Tested using nVidia proprietary driver on Debian 7.
  • Loading branch information
zturtleman committed Mar 17, 2014
1 parent 8455b5a commit 344ff23
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions code/sdl/sdl_glimp.c
Expand Up @@ -407,9 +407,11 @@ static int GLimp_SetMode(int mode, qboolean fullscreen, qboolean noborder)

SDL_GL_SetAttribute( SDL_GL_DOUBLEBUFFER, 1 );

#if 0 // if multisampling is enabled on X11, this causes create window to fail.
// If not allowing software GL, demand accelerated
if( !r_allowSoftwareGL->integer )
SDL_GL_SetAttribute( SDL_GL_ACCELERATED_VISUAL, 1 );
#endif

if( ( SDL_window = SDL_CreateWindow( CLIENT_WINDOW_TITLE, x, y,
glConfig.vidWidth, glConfig.vidHeight, flags ) ) == 0 )
Expand Down

0 comments on commit 344ff23

Please sign in to comment.