| Summary: | VSync is not activated under MacOS X Snow Leopard | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Vittorio Giovara <vitto.giova> |
| Component: | video | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED INVALID | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | CC: | icculus |
| Version: | 1.2.14 | ||
| Hardware: | All | ||
| OS: | Mac OS X 10.6 | ||
This is working correctly in SDL 1.3. but isn't it worth to fix this bug in the sdl 1.2 branch? Yes, but I won't have time to get to it for a while. :) Is the concern that 1.2 isn't setting vsync at all, or it doesn't set vsync until you call SDL_SetVideoMode() again? 1.3 lets you toggle vsync on an existing context, 1.2 needs you to specify vsync preferences before setting the video mode. (it's working here on Lion, fwiw: run test/testgl -sync, and you can see.) --ryan. oh my bad, i was enabling SDL_GL_SWAP_CONTROL after creating the window when enabled before, it works fine! thanks for pointing it out |
the usual 1.2 way of enabling Vsync is not working since mac os x 10.6 came out i don't know if it's a driver issue but just writing SDL_GL_SetAttribute(SDL_GL_SWAP_CONTROL, 1); has no effect and a lot of tearing happens when using a gl context. We found out the fix code in some python game in which they used one := 1; CGLSetParameter(CGLGetCurrentContext(), 222, @one); to workaround it. Above code is in pascal and links agains the OpenGL library. With this fix tearing never occurs under any mac version; i have untested if the problem also affects sdl 1.3, might be worth to try it.