Merge pull request #823 from erwincoumans/master

disable VSYNC for VR
This commit is contained in:
erwincoumans
2016-10-08 08:26:48 -07:00
committed by GitHub
2 changed files with 10 additions and 2 deletions

View File

@@ -3396,7 +3396,7 @@ void PhysicsServerCommandProcessor::stepSimulationRealTime(double dtInSec)
{
btScalar desiredVelocity = 0.f;
btScalar desiredPosition = q_new[link];
//motor->setRhsClamp(gRhsClamp);
motor->setRhsClamp(gRhsClamp);
//printf("link %d: %f", link, q_new[link]);
motor->setVelocityTarget(desiredVelocity,1.0);
motor->setPositionTarget(desiredPosition,0.6);

View File

@@ -2190,7 +2190,15 @@ int main(int argc, char *argv[])
pMainApplication->Shutdown();
return 1;
}
//request disable VSYNC
typedef bool (APIENTRY *PFNWGLSWAPINTERVALFARPROC)(int);
PFNWGLSWAPINTERVALFARPROC wglSwapIntervalEXT = 0;
wglSwapIntervalEXT =
(PFNWGLSWAPINTERVALFARPROC)wglGetProcAddress("wglSwapIntervalEXT");
if (wglSwapIntervalEXT)
wglSwapIntervalEXT(0);
pMainApplication->RunMainLoop();
pMainApplication->Shutdown();