SFML community forums
General => Feature requests => Topic started by: izackp on August 25, 2014, 05:41:08 pm
-
It would be nice if you didn't have to use a timer to run your game loop.
I tried modifying the source to give me the NSOpenGLView in order to set up the SVDisplayLink, but its been a huge pain since everything was designed to provide an os independent abstraction. I don't think its bad design to provide the developer with an OSXWindow in osx only objects, but, if you're completely against it, an option to set a VSYNC callback would be nice then again I don't think all OSs support that.
Anyways, I've decided to leave it be until a later time for my game.
Thanks for you time!
-
I tried modifying the source to give me the NSOpenGLView in order to set up the SVDisplayLink, but its been a huge pain since everything was designed to provide an os independent abstraction.
Yes, that's the whole point of a portable multimedia library ;)
Why do you need platform-specific access? What is the problem with sf::Clock?
-
I've no idea what you want to do but SFML already provide sf::Window::getSystemHandle which gives you either a NSWindow or a NSView and therefore access to the NSOpenGLView subview (on os x).
-
On iOS, DisplayLink is the only way to implement v-sync. It is also mandatory to use the refresh callback (and let iOS run the main loop) to be compliant with the game center: SDL has an ugly hack that allows iOS developers to run their game loop like this instead of the manual game loop.
So yes, I guess it's an important topic, but don't expect it to be addressed soon, the iOS port has still not been released publicly ;)
-
I've no idea what you want to do but SFML already provide sf::Window::getSystemHandle which gives you either a NSWindow or a NSView and therefore access to the NSOpenGLView subview (on os x).
I can't believe I missed that. Thanks lol.
I mostly want it in because its the 'right' way of doing things when it comes to OSX/iOS. I also have a bad feeling it's going to mess with my game's interpolation (http://www.danielborgmann.eu/2010/09/fixed-timestep-with-interpolation-part.html) on high hz monitors. It also helps me avoid hard coding in a 'refresh rate' for the screen (or doing extensive research on how to get/estimate the refresh rate).