Currently, we only count the CPU/host time it takes between two consecutive glfwSwapBuffers calls.
More interesting for bottleneck analysis however would be to know the actual time it takes the GPU to perform a draw call.
So, for contexts that support it, we could use OpenGL Query Objects with glQueryCounter and the GL_TIMESTAMP target to count the GPU time.
Currently, we only count the CPU/host time it takes between two consecutive
glfwSwapBuffers
calls. More interesting for bottleneck analysis however would be to know the actual time it takes the GPU to perform a draw call.So, for contexts that support it, we could use OpenGL Query Objects with
glQueryCounter
and theGL_TIMESTAMP
target to count the GPU time.