diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-06-22 01:16:02 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-06-22 01:16:02 +0300 |
commit | 42670ec6e26e0659b885cbdea2af6a9c71049971 (patch) | |
tree | 17cee65b1d719c572e1afb2a20f92db043eef712 /src/graphicsmanager.cpp | |
parent | a50b110c1d5a347158cdb8d28a68237b816797ac (diff) | |
download | manaverse-42670ec6e26e0659b885cbdea2af6a9c71049971.tar.gz manaverse-42670ec6e26e0659b885cbdea2af6a9c71049971.tar.bz2 manaverse-42670ec6e26e0659b885cbdea2af6a9c71049971.tar.xz manaverse-42670ec6e26e0659b885cbdea2af6a9c71049971.zip |
Add OpenGL extension GL_EXT_timer_query.
Diffstat (limited to 'src/graphicsmanager.cpp')
-rw-r--r-- | src/graphicsmanager.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/graphicsmanager.cpp b/src/graphicsmanager.cpp index be16d68e0..8dbbc75fe 100644 --- a/src/graphicsmanager.cpp +++ b/src/graphicsmanager.cpp @@ -831,6 +831,7 @@ void GraphicsManager::initOpenGLFunctions() const bool is10 = checkGLVersion(1, 0); const bool is11 = checkGLVersion(1, 1); const bool is12 = checkGLVersion(1, 2); + const bool is15 = checkGLVersion(1, 5); const bool is20 = checkGLVersion(2, 0); const bool is21 = checkGLVersion(2, 1); mSupportModernOpengl = true; @@ -976,6 +977,20 @@ void GraphicsManager::initOpenGLFunctions() { logger->log1("GL_EXT_debug_marker not found"); } + if (is15 && supportExtension("GL_EXT_timer_query")) + { + logger->log1("found GL_EXT_timer_query"); + assignFunction(glGenQueries, "glGenQueries"); + assignFunction(glBeginQuery, "glBeginQuery"); + assignFunction(glEndQuery, "glEndQuery"); + assignFunction(glDeleteQueries, "glDeleteQueries"); + assignFunction(glGetQueryObjectiv, "glGetQueryObjectiv"); + assignFunction(glGetQueryObjectui64v, "glGetQueryObjectui64vEXT"); + } + else + { + logger->log1("GL_EXT_timer_query not supported"); + } if (is20 && supportExtension("GL_ARB_invalidate_subdata")) { logger->log1("found GL_ARB_invalidate_subdata"); |