diff options
-rw-r--r-- | src/openglgraphics.cpp | 15 | ||||
-rw-r--r-- | src/openglgraphics.h | 2 |
2 files changed, 17 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 diff --git a/src/openglgraphics.h b/src/openglgraphics.h index 650ad668a..d602f3126 100644 --- a/src/openglgraphics.h +++ b/src/openglgraphics.h @@ -151,6 +151,8 @@ class OpenGLGraphics : public Graphics protected: void setTexturingAndBlending(bool enable); + void logString(char *format, GLenum num); + private: GLfloat *mFloatTexArray; GLint *mIntTexArray; |