Last time I used GetTickCount it had a 20ms granularity. I'm not aware of how it works now on your system. That was insufficient to handle 300fps, let alone 1000. What's the granularity on your system?
Hmm, thanks for pointing that out. I didn't even bother trying to figure out the granularity because either way using GetTickCount() would be useless at this point because it lack accuracy. I switched over to timeGetTime(), but now the simulation of the ragdoll seems very slow. This is my main render function now:
if (timeGetTime()-frameEndTime < ((FPS_LIMIT)*0.001))
frameStartTime = timeGetTime();
d3ddev->ClearRenderTargetView(renderTargetView, D3DXVECTOR4(0, 0, 0, 1));
d3ddev->ClearDepthStencilView(DepthStencilView, D3D10_CLEAR_DEPTH|D3D10_CLEAR_STENCIL, 1.0f, 0);
D3DXVECTOR3 c = D3DXVECTOR3(cam->getPos());
frameEndTime = timeGetTime();
frameTime = frameEndTime-frameStartTime;
and the physics.update function:
if (deltaTime == 0)
sec = btScalar(deltaTime*0.001);/* convert frame to second */
float fps = 1.0f/sec;
_world->stepSimulation(sec, (int)fps, sec);
I still have no idea about how to correctly use the stepSimulation function for a realistic ragdoll simulation though, and the Stepping The World wiki entry didn't seem to explain things to make it any easier to understand.