From 0c72851a2b47acba27944106eea4619b658d40ca Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 4 Jun 2014 22:29:34 +0300 Subject: Add info in log about assigned OpenGL functions. --- src/graphicsmanager.cpp | 9 ++++++++- src/render/mgl.h | 1 - 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/graphicsmanager.cpp b/src/graphicsmanager.cpp index a628c25a7..e81f54cbd 100644 --- a/src/graphicsmanager.cpp +++ b/src/graphicsmanager.cpp @@ -87,7 +87,12 @@ #endif #define assignFunction(func, name) m##func \ - = reinterpret_cast(getFunction(name)) + = reinterpret_cast(getFunction(name)); \ + if (m##func == nullptr) \ + logger->log(std::string("function not found: ") + name); \ + else \ + logger->log(std::string("assigned function: ") + name); + #endif GraphicsManager graphicsManager; @@ -886,6 +891,7 @@ void GraphicsManager::initOpenGLFunctions() } if (checkGLVersion(2, 1) && supportExtension("GL_ARB_vertex_array_object")) { + logger->log1("found GL_ARB_vertex_array_object"); assignFunction(glGenVertexArrays, "glGenVertexArrays"); assignFunction(glBindVertexArray, "glBindVertexArray"); assignFunction(glDeleteVertexArrays, "glDeleteVertexArrays"); @@ -930,6 +936,7 @@ void GraphicsManager::initOpenGLFunctions() if (checkGLVersion(4, 0) || supportExtension("GL_ARB_separate_shader_objects")) { + logger->log1("found GL_ARB_separate_shader_objects"); assignFunction(glUniform1f, "glUniform1f"); assignFunction(glUniform2f, "glUniform2f"); assignFunction(glUniform3f, "glUniform3f"); diff --git a/src/render/mgl.h b/src/render/mgl.h index 1eba9a1ef..d4dd33bcc 100644 --- a/src/render/mgl.h +++ b/src/render/mgl.h @@ -238,7 +238,6 @@ defNameE(glBindFragDataLocation); defNameE(glUseProgram); defNameE(glValidateProgram); defNameE(glGetAttribLocation); -defNameE(glActiveTexture); defNameE(glUniform1f); defNameE(glUniform2f); defNameE(glUniform3f); -- cgit v1.2.3-70-g09d2