[SDL] Multisampling crash problem

Edward Byard e_byard at yahoo.co.uk
Sun Jul 1 12:19:22 PDT 2007


Don't quote me on this, but I don't think this is legal as SDL goes.

Try shutting down SDL, free the screen surface then restart SDL with the new settings.

Ed

----- Original Message ----
From: Will <willeom at gmail.com>
To: sdl at libsdl.org
Sent: Sunday, 1 July, 2007 8:11:24 PM
Subject: [SDL] Multisampling crash problem

 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;


_______________________________________________
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org







      ___________________________________________________________ 
Yahoo! Mail is the world's favourite email. Don't settle for less, sign up for
your free account today http://uk.rd.yahoo.com/evt=44106/*http://uk.docs.yahoo.com/mail/winter07.html 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20070701/4d542955/attachment.html 


More information about the SDL mailing list