glQueryCounter displays incorrect timestamp values

Hello, I am trying to run a simple program that displays the current time of the GPU using this and I am using an nvidia graphics card. My os is Linux

GLint64 time;
glGetInteger64v(GL_TIMESTAMP, &time);
std::cout << time << std::endl;

The output of this is displaying incorrect timestamp values, what are the possible reasons? Pretty new to opengl

Why do you believe that the timestamps are incorrect? Also, how does this relate to glQueryCounter?

Timestamps generated by glQueryCounter are taken at the point that all prior commands have completed. Those generated by glGetInteger are taken when the command is issued (i.e. after any buffered commands have been flushed but not necessarily executed).

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.