I think no one will know how to solve this problem!
i installed visual studio 2012 version 11.0.50727.1 RTMREL.
and used of_v0.8.4_vs_release.zip.
When I run the example:
the first time it works fine. using 60 fps.
BUT, after 3 days or less, when i try to run it again… it run at 2000 FPS or MORE.
so i tested it on my notebook and it still works fine!
i mean… wtf happened? how the hell am i supposed to fix it?
I googled a lot of time and found many fail solutions:
- use function “ofSetFrameRate(60);” ( that can cause MANY PROBLEMS. -_- )
- use vsync On. or just set it ON ur video driver. ( i already did both and nothing happened…AMD Radeon HD 7900 Series. this is my video driver )
- reinstall your windows 7 x64. maybe it’s because of some kind of microsoft shit update. Ok i did and turned off “windows autoupdates” and it worked! BUT, after some days the SAME PROBLEM happened! so i reinstalled my windows AGAIN and after every program that i installed i checked if the example was still working at 60 fps and i turned off all autoupdates that exist of it!
Guess what happened! after some days …same problem…2000 fps or more
Can someone PLEASE help me? i am really tired about it and i really want to use that framework.
This framework is exacly what i need! I do not know what else to do.
I’ve read that if you don’t specify a target frame rate with ofSetFrameRate(); and don’t use vsync oF will try to run the update and draw functions as fast as possible.
It works fine with me. What kind of problems are you facing when using ofSetFrameRate()?
problems with setframerate:
- when you set a fixed frame rate it become inaccurate. No matter which framework you use. This always happen. So if you set a fixed framerate and make your camera move, strange things will happen. Sometimes, the speed of your camera will double and then goes back to normal again.
- The own creator of this framework uses VerticalSync in their examples. what means that must be the best way to do that.
- Besides, a example is built to run in any kind of computer. Faster or slower. To show the potential of the framework.
Also, why “ofSetVerticalSync(true)” should not work??? it is doing nothing here!!
My video card “AMD Radeon” is famous for having problems with vertical sync.
I have not solved it yet but when if i do, i will post it here. =(
ofSetVerticalSync will make your app run at 60 fps. but it isnt working here.
I think ofSetVerticalSync() won’t do anything on windows (at least with the GLFW window manager) as apparently forcing vsync would cause weird flickering with the windows drawing system.
You could try to make sure you set vsync on the driver settings for all application (or at least for the binary you just built), try to call the function : wglSwapInterval(1) to tell windows to enable vsync. Make sure your graphic driver are up to date.
If you’re running something along with your application (having a chrome browser open for instance) it could cause some weird frame rate situation (a few years ago I found out that having chrome open would make my app perform better as chrome was enabling some precise timer or something like that… so be aware of third party app that could be interfering with yours)
1: If you have an AMD card, the vertical sync will not show its working, even if its on. this is a driver problem.
2: I personally had a problem with ofSetVerticalSync, so instead, I got the window pointer and set the vsync myself. this worked for me. But not on my system with the AMD card.
3: #2 is supposedly going to be fixed in the next oF (0.9.0) release. I posted the issue on the github page.
Hello everyone and thank you for helping me out! I SOLVED MY PROBLEM! =D
The real problem was the driver VERSION of my video card (AMD Radeon HD 7900) !
I was using the driver with last version “amd-catalyst-omega-14.12-with-dotnet45-win7-64bit” but this version has a BIG BUG (with windows 7 64bits).
After a hour it makes the Vsync turn off and you can’t make it work again.
so you just need to install a older version: “13-9_win7_win8_64_dd_ccc_whql.exe” AND set the vsync to “always on” OR “leave it on unless the application sets it”.
And it SOLVED the problem. Shame on AMD Radeon video cards! =(
Cabral, if i use ofSetFrameRate(60); my code should work like this:
camera.setPosition(ofVec3f(0.0f, -25.0f, 100.0f));
camera.lookAt(ofVec3f(0.0f, 0.0f, 0.0f));
am i doing something wrong? should i leave the “camera.move(…)” inside the draw function?
OMG MAN! THANK YOU! it really worked!!
I just needed a single function to solve this? LOL!!! !I should have seen it before!
Your my hero! thanks again!!!
by the way, in windows i should use wglSwapIntervalEXT(1);
1: You’re completely right!!! AMD card has this problem and my first solution was to install a older version =P.
2: Did you try to call “wglSwapIntervalEXT(1);”? this worked on my system with the AMD card!
(windows 7 64bits.) this is the best solution i found.
3: That sounds good! i really liked this framework and how simple it is! I hope they provide the next version soon!!!
4: Thanks for help ! =)