IPhone : Vertical Sync in iOS (SDL2 / OpenGL ES)

on Wednesday, April 8, 2015

I'm using the iPhone simulator (iOS 8.2), and I'm having trouble enabling vertical sync using SDL2.


I'm trying to call:



if (SDL_GL_SetSwapInterval(-1) == -1)
if (SDL_GL_SetSwapInterval(1) == -1)
std::cout << "Failed to set Vertical Sync" << std::endl;


after creating the window and setting up the OpenGL ES 2 context to enable vertical sync, but it seems that both calls fail on iOS.


How can I enable vertical sync on an iOS platform using OpenGL ES 2 and SDL2?


In case that's not an option, is there an easy way to limit the FPS of an application to 60?


0 comments:

Post a Comment