[SDL] Multisampling crash problem

Will willeom at gmail.com
Sun Jul 1 12:11:24 PDT 2007


 Hello

 I’m working on a project made with SDL that has the ability for the user to
choose various video settings at run-time. The problem is that when
multisampling is changed at runtime, other than once on program start, the
program crashes.

Here is some example code below.  Help much appreciated.
 Thanks.

SDL_GL_SetAttribute(SDL_GL_MULTISAMPLEBUFFERS,1);
SDL_GL_SetAttribute(SDL_GL_MULTISAMPLESAMPLES,6);

SDL_Surface* screen = SDL_SetVideoMode(640, 480, 32, SDL_OPENGL);
if ( !screen )
  return 1;

//...
//User wants anti-aliasing disabled
SDL_GL_SetAttribute(SDL_GL_MULTISAMPLEBUFFERS,0);
SDL_GL_SetAttribute(SDL_GL_MULTISAMPLESAMPLES,1);

//Crash
screen = SDL_SetVideoMode(640, 480, 32, SDL_OPENGL);
if ( !screen )
  return 1;




More information about the SDL mailing list