Render Buffer delayed wrt current position

My main loop does the following (pseudocode):

for (int i = 0;; ++i) {

  t = scene->getActiveTransforms();
  graphics.update(t);       // Update graphics model matrices

  rb = scene->getRenderBuffer();
  render_buffer.update(rb); // Update debug visualization VBOs


  graphics.draw();          // Draw models with latest transforms
  render_buffer.draw();     // Draw latest PhysX Render Buffer

  // Update animation of some kinematic actors

If everything stands still the RB perfectly matches the graphics, but as soon I start some animation the RB shape is a little delayed wrt the graphics.

That is not clear to me, since I retrieve both the new poses and the RB while the simulation is not running, and I expect they should match.

Am I missing something?

Thanks in advance.

As far as I know, you’re not missing something. I believe the debug drawing is a frame behind.

Thanks for the clarification.