From 49be75e82241dbd5aa8959dcc4d3ba39a8a7a28c Mon Sep 17 00:00:00 2001 From: assiduous Date: Thu, 27 Aug 2020 12:33:45 -0700 Subject: Implemented duration queries in Vulkan --- Graphics/GraphicsEngineOpenGL/src/DeviceContextGLImpl.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'Graphics/GraphicsEngineOpenGL') diff --git a/Graphics/GraphicsEngineOpenGL/src/DeviceContextGLImpl.cpp b/Graphics/GraphicsEngineOpenGL/src/DeviceContextGLImpl.cpp index 7612287b..c1f038bf 100644 --- a/Graphics/GraphicsEngineOpenGL/src/DeviceContextGLImpl.cpp +++ b/Graphics/GraphicsEngineOpenGL/src/DeviceContextGLImpl.cpp @@ -1377,15 +1377,19 @@ void DeviceContextGLImpl::EndQuery(IQuery* pQuery) DEV_CHECK_GL_ERROR("glQueryCounter failed"); } else +#endif { LOG_ERROR_MESSAGE_ONCE("Timer queries are not supported by this device"); } -#endif break; case QUERY_TYPE_DURATION: +#if GL_TIME_ELAPSED glEndQuery(GL_TIME_ELAPSED); DEV_CHECK_GL_ERROR("Failed to end GL_TIME_ELAPSED query"); +#else + LOG_ERROR_MESSAGE_ONCE("Duration queries are not supported by this device"); +#endif break; default: -- cgit v1.2.3