summaryrefslogtreecommitdiff
path: root/src/graphicsmanager.cpp
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 /src/graphicsmanager.cpp
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.
Diffstat (limited to 'src/graphicsmanager.cpp')
-rw-r--r--src/graphicsmanager.cpp9
1 files changed, 8 insertions, 1 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");