When are glXQueryFrameCountNV wglQueryFrameCountNVupdated?

26 Views Asked by At

I am trying to synchronize rendering between multiple computers, for this I use the NVIDIA GLX_NV_swap_group and WGL_NV_swap_group extensions. The extensions also provide QueryFrameCountNV to access a universal frame counter shared between synchronized windows.

However I am not sure when this count is updated and how it changes between frames.

I would assume that the returned value changes with each call to SwapBuffers and that it increments by one each frame, so that both calls in the following pseudo code always return the same value.

while(true){
   swapBuffers();
   QueryFrameCountNV();
   sleep(1);
   QueryFrameCountNV();
}

When I tried using it in a complex application I saw multiple outliers (zero increments, increments by 2 or 3) where I am unsure if they where caused by my code or a fundamental misunderstanding of how the API works.

This leads to the question if my assumption that the frame counter only updates on calls to swap buffers is correct and in which cases I should expect an increment different from one.

0

There are 0 best solutions below