| Summary: | SDL_SetVideoMode always fails after SDL_GL_MULTISAMPLESAMPLES is changed at runtime on windows vista | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Will <willeom> |
| Component: | video | Assignee: | Ryan C. Gordon <icculus> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | ||
| Version: | 1.2.11 | ||
| Hardware: | x86 | ||
| OS: | Windows Vista | ||
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. Thanks Sam! You're welcome! :) |
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;