From b6ca846eb0bd53c4e28a6fcd6bf2a403da94a12f Mon Sep 17 00:00:00 2001 From: James Benton Date: Tue, 31 Jul 2012 12:48:27 +0100 Subject: [PATCH] Check if GL_ARB_timer_query is supported before using it. --- retrace/glretrace_main.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/retrace/glretrace_main.cpp b/retrace/glretrace_main.cpp index ce06402..e3bb9d4 100644 --- a/retrace/glretrace_main.cpp +++ b/retrace/glretrace_main.cpp @@ -171,6 +171,12 @@ getActiveProgram() void beginProfile(trace::Call &call) { if (firstFrame) { + const char* extensions = (const char*)glGetString(GL_EXTENSIONS); + if (!glws::checkExtension("GL_ARB_timer_query", extensions)) { + std::cout << "Error: Cannot run profile, GL_ARB_timer_query extension is not supported." << std::endl; + exit(-1); + } + frame_start(); } -- 2.43.0