summaryrefslogtreecommitdiff
path: root/src/openglgraphics.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-04-26 14:32:39 +0300
committerAndrei Karas <akaras@inbox.ru>2012-04-26 14:40:11 +0300
commitd9c4b58680b7a1e1e5c69f3bffa548c6f4898723 (patch)
treefd4284a547552792cfe527cb1b03e74cbbeb68d3 /src/openglgraphics.cpp
parentb328b78653133f05107eadba31572874e4c35e95 (diff)
downloadmv-d9c4b58680b7a1e1e5c69f3bffa548c6f4898723.tar.gz
mv-d9c4b58680b7a1e1e5c69f3bffa548c6f4898723.tar.bz2
mv-d9c4b58680b7a1e1e5c69f3bffa548c6f4898723.tar.xz
mv-d9c4b58680b7a1e1e5c69f3bffa548c6f4898723.zip
Logging opengl vendor and renderer.
Diffstat (limited to 'src/openglgraphics.cpp')
-rw-r--r--src/openglgraphics.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/openglgraphics.cpp b/src/openglgraphics.cpp
index 40f1087d0..aba5a7233 100644
--- a/src/openglgraphics.cpp
+++ b/src/openglgraphics.cpp
@@ -118,6 +118,13 @@ bool OpenGLGraphics::setVideoMode(int w, int h, int bpp, bool fs,
}
#endif
+ logString("gl vendor: %s", GL_VENDOR);
+ logString("gl renderer: %s", GL_RENDERER);
+ logString("gl version: %s", GL_VERSION);
+
+// logger->log("gl extensions: %s", reinterpret_cast<const char*>(
+// glGetString(GL_EXTENSIONS)));
+
// Setup OpenGL
glViewport(0, 0, w, h);
glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_FASTEST);
@@ -1445,4 +1452,12 @@ void OpenGLGraphics::dumpSettings()
}
}
+void OpenGLGraphics::logString(char *format, GLenum num)
+{
+ const char *str = reinterpret_cast<const char*>(glGetString(num));
+ if (!str)
+ logger->log(format, "?");
+ else
+ logger->log(format, str);
+}
#endif // USE_OPENGL