mirror of
https://github.com/bulletphysics/bullet3
synced 2025-01-18 21:10:05 +00:00
disable VSYNC for VR
clamp KUKA motor motion to be less abrupt
This commit is contained in:
parent
4cd401212c
commit
c5d4f7b3b3
@ -3396,7 +3396,7 @@ void PhysicsServerCommandProcessor::stepSimulationRealTime(double dtInSec)
|
|||||||
{
|
{
|
||||||
btScalar desiredVelocity = 0.f;
|
btScalar desiredVelocity = 0.f;
|
||||||
btScalar desiredPosition = q_new[link];
|
btScalar desiredPosition = q_new[link];
|
||||||
//motor->setRhsClamp(gRhsClamp);
|
motor->setRhsClamp(gRhsClamp);
|
||||||
//printf("link %d: %f", link, q_new[link]);
|
//printf("link %d: %f", link, q_new[link]);
|
||||||
motor->setVelocityTarget(desiredVelocity,1.0);
|
motor->setVelocityTarget(desiredVelocity,1.0);
|
||||||
motor->setPositionTarget(desiredPosition,0.6);
|
motor->setPositionTarget(desiredPosition,0.6);
|
||||||
|
@ -2191,6 +2191,14 @@ int main(int argc, char *argv[])
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//request disable VSYNC
|
||||||
|
typedef bool (APIENTRY *PFNWGLSWAPINTERVALFARPROC)(int);
|
||||||
|
PFNWGLSWAPINTERVALFARPROC wglSwapIntervalEXT = 0;
|
||||||
|
wglSwapIntervalEXT =
|
||||||
|
(PFNWGLSWAPINTERVALFARPROC)wglGetProcAddress("wglSwapIntervalEXT");
|
||||||
|
if (wglSwapIntervalEXT)
|
||||||
|
wglSwapIntervalEXT(0);
|
||||||
|
|
||||||
pMainApplication->RunMainLoop();
|
pMainApplication->RunMainLoop();
|
||||||
|
|
||||||
pMainApplication->Shutdown();
|
pMainApplication->Shutdown();
|
||||||
|
Loading…
Reference in New Issue
Block a user