Hi!
I recently found out about SFML, so I wanted to try it, but I already have a problem with my first test program.
I'm programming in C# using the .NET bindings.
The problem is, that the framerate limit doesn't behave as intended.
I'm trying to set the limit to 60 fps, but when I run the program, the frame rate stays only at 32 fps. But when I move another window over the SFML window, the framerate strangely rises up to 64 fps.
If I disable the limit and enable vertical sync, it perfectly stays at 60 fps, but I don't want to use vertical sync since it varies on different computers.
What I already did, was using SFML 1.5, SFML SVN and even SFML2 SVN in Windows with Visual Studio 2008 and in Ubuntu with monodevelop, but always with the same behavior.
I'm just using this simple code:
using System;
using SFML.Graphics;
using SFML.Window;
namespace SFML_Test
{
class Program
{
static void App_Closed(object sender, EventArgs e)
{
((RenderWindow)sender).Close();
}
static void Main(string[] args)
{
RenderWindow App = new RenderWindow(new VideoMode(640, 480, 32), "SFML_Test");
App.Closed += new EventHandler(App_Closed);
App.SetFramerateLimit(60);
while (App.IsOpened())
{
App.DispatchEvents();
App.Display();
}
}
}
}
I would really appreciate any ideas that could solve this problem, because I'd like to use SFML in the future instead of SDL for platform independent developing.