LWJGLX / debug

Debugging LWJGL3 OpenGL applications
MIT License
37 stars 7 forks source link

Profile GPU time for draw calls via query objects #11

Closed httpdigest closed 7 years ago

httpdigest commented 7 years ago

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.