We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 461 - SDL_SetVideoMode always fails after SDL_GL_MULTISAMPLESAMPLES is changed at runtime on windows vista
Summary: SDL_SetVideoMode always fails after SDL_GL_MULTISAMPLESAMPLES is changed at r...
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: 1.2.11
Hardware: x86 Windows Vista
: P2 normal
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-07-16 11:45 UTC by Will
Modified: 2007-07-19 14:02 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Will 2007-07-16 11:45:22 UTC
If I change the SDL_GL_MULTISAMPLESAMPLES attribute at run-time to anything other than what it was, on Windows Vista, SDL_SetVideoMode always fails.

 Both "SDL_GL_MULTISAMPLESAMPLES" attributes were previously tested to work when SDL_SetVideoMode was set the first time. I tried different combinations of attributes.

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

//App code...
//Ant-Aliasing disabled by user (Fail)
SDL_GL_SetAttribute(SDL_GL_MULTISAMPLEBUFFERS,0);
SDL_GL_SetAttribute(SDL_GL_MULTISAMPLESAMPLES,0);
screen = SDL_SetVideoMode(640, 480, 32, SDL_OPENGL);
if ( !screen )
    return 1;
Comment 1 Sam Lantinga 2007-07-19 01:10:15 UTC
This is fixed in subversion revision 3331.  Thanks!

Note that you have to recreate the window when you change multi-sampling.  SDL does this for you, but you will see the window go away and re-appear.  You'll have to reinitialize your OpenGL context of course.
Comment 2 Will 2007-07-19 14:00:48 UTC
Thanks Sam!
Comment 3 Sam Lantinga 2007-07-19 14:02:33 UTC
You're welcome! :)