vsync problem

Started by
1 comment, last by LilBudyWizer 18 years, 4 months ago
I'm making a game with Opengl. When I tested it, the game runs at 60 fps, but then I tested in a friend's pc and the game runs at 300 fps or more. It seems that my pc uses vertical sync, but not in my friend's pc. There is any way to enable vsync? thanks.
Advertisement
In your Display Settings in the control panel click on the advanced tab and look there. Your graphics hardware might be configured to always force v-sync.

ace
Even with vsync enabled they could set their refresh rate to 100hz and then you would run at 100 fps. If they don't have a 3D accelerator they might well drop to 20 fps or lower. You can use wglSwapIntervalEXT from the WGL_EXT_swap_control to try to turn vsync back on, but I don't know if it will override the control panel. With the GeForce drivers you specify whether you want it under application control or not and if not which way you want it set. I would assume if it isn't under application control then it doesn't matter what the application does.

Since you have no reasonable ability to control the frame rate it's best to simply make your animations time based. Rather than velocity being stated in units of per frame you state it in per second, calculate the time since last frame and multiply your velocity by that time delta to find how far it moved since last frame.
Keys to success: Ability, ambition and opportunity.

This topic is closed to new replies.

Advertisement