Image tearing. Fixed.
by Peterjohn Griffiths · in Technical Issues · 05/12/2011 (1:10 pm) · 1 replies
I am using TGB and getting some image tearing instead of a nice smooth flow.
I thought this was the Platform Kit but can replicate this without it.
Seems to be TGB.
The FPS is very high so its not that causing the problem.
Vsynk doesn't fix the problem either.
I have tested on a gaming machine and that also has the same problem.
I thought, lets match the framerate in the engine to the frequency of the monitor.
I have done this and output 60FPS from the engine but get realy bad tearing.
Not sure why.
Ive implemented the new framerate in TGBGame->Source Files->game->main.cc inside DemoGame::mainLoop() just before the last PROFILE_END(); call.
I have output to the console and can see that every second it has looped 60 times nice and clean with a steady loop, 40 fames at 17ms and 20 frames at 16ms = 1000ms or 1second.
My monitor is set to 60hertz
I still see tearing and think the FPS limiting shouldn't be done in the main.cc file, but somewhere else in the engine that outputs the frames to the graphics card.
Anyone got any ideas?.
I thought this was the Platform Kit but can replicate this without it.
Seems to be TGB.
The FPS is very high so its not that causing the problem.
Vsynk doesn't fix the problem either.
I have tested on a gaming machine and that also has the same problem.
I thought, lets match the framerate in the engine to the frequency of the monitor.
I have done this and output 60FPS from the engine but get realy bad tearing.
Not sure why.
Ive implemented the new framerate in TGBGame->Source Files->game->main.cc inside DemoGame::mainLoop() just before the last PROFILE_END(); call.
I have output to the console and can see that every second it has looped 60 times nice and clean with a steady loop, 40 fames at 17ms and 20 frames at 16ms = 1000ms or 1second.
My monitor is set to 60hertz
I still see tearing and think the FPS limiting shouldn't be done in the main.cc file, but somewhere else in the engine that outputs the frames to the graphics card.
Anyone got any ideas?.
Torque Owner Peterjohn Griffiths
Default Studio Name
Problem was
$pref::Video::disableVerticalSync = 1;
in file
common/preferences/defaultPrefs.cs
Changed to
$pref::Video::disableVerticalSync = 0;
and now with Vsync enabled on the graphics cards, all is working fine.
Seems the software setting in the engine can override the card driver.
:O