summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-06-04 22:29:34 +0300
committerAndrei Karas <akaras@inbox.ru>2014-06-04 22:33:21 +0300
commit0c72851a2b47acba27944106eea4619b658d40ca (patch)
tree1d1540b574deceda4b320521af658396b808d958
parent5dbe8005e02b29da820fb4ed09fd3b0645683f70 (diff)
downloadmanaverse-0c72851a2b47acba27944106eea4619b658d40ca.tar.gz
manaverse-0c72851a2b47acba27944106eea4619b658d40ca.tar.bz2
manaverse-0c72851a2b47acba27944106eea4619b658d40ca.tar.xz
manaverse-0c72851a2b47acba27944106eea4619b658d40ca.zip
Add info in log about assigned OpenGL functions.
-rw-r--r--src/graphicsmanager.cpp9
-rw-r--r--src/render/mgl.h1
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<func##_t>(getFunction(name))
+ = reinterpret_cast<func##_t>(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);