Could anyone please explain the difference between glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_COMPAT_PROFILE) and glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE)?

Briefly: CORE hides “the old stuff”. COMPATIBILITY exposes it.

More detail:

Oh I see. Because getQueryObjectui64v is returning the correct timestamp value when the program is OPENGL_COMPAT_PROFILE and returning the wrong timestamp value when it is OPENGL_CORE_PROFILE when we pass the same query object as input to the APIs. Are the profiles responsible for this since that is the only difference?

glGetQueryObjectui64v() is in the OpenGL 4.6 Core Profile Spec as well as the OpenGL 4.6 Compatibility Profile Spec.

So this sounds like either something odd you’re doing in your application or some issue with your driver.

  • Are you checking for GL errors?
  • What query did you issue that you are trying to read back with this API?
  • Is it supported by Core, or just Compatibility?

Thanks for sharing the specs. I found out the issue was with the query object input that was being passed to the GetQueryObjectui64v. does it make a difference if the queryObject is generated in one context and glQueryCounter and glGetQueryObjectui64v is invoked in another? There is a wglMakeCurrent call in between. Because this seems to be affecting only the core profile and not the compatibility profile?

Yes, it makes a lot of difference. Query objects are strange. While they are not container objects, they are also not shared between contexts. To my knowledge, they are the only non-container object that is not shared.

That, I can’t explain.

Oh I see. But why is it working in the Compatibility profile and not working in the Core profile?

Just read your other message. thanks!