From 1e98413a7e08ef63570d0620be42888e5c03992f Mon Sep 17 00:00:00 2001 From: Jonas Kulla Date: Tue, 15 Oct 2013 23:19:52 +0200 Subject: [PATCH] Init: Print various GL implementation strings --- src/main.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index 189c749..ce42784 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -58,6 +58,21 @@ rgssThreadError(RGSSThreadData *rtData, const QByteArray &msg) rtData->rqTermAck = true; } +static inline const char* +glGetStringInt(GLenum name) +{ + return (const char*) glGetString(name); +} + +static void +printGLInfo() +{ + qDebug() << "GL Vendor :" << glGetStringInt(GL_VENDOR); + qDebug() << "GL Renderer :" << glGetStringInt(GL_RENDERER); + qDebug() << "GL Version :" << glGetStringInt(GL_VERSION); + qDebug() << "GLSL Version :" << glGetStringInt(GL_SHADING_LANGUAGE_VERSION); +} + int rgssThreadFun(void *userdata) { RGSSThreadData *threadData = static_cast(userdata); @@ -90,6 +105,8 @@ int rgssThreadFun(void *userdata) glClear(GL_COLOR_BUFFER_BIT); SDL_GL_SwapWindow(win); + printGLInfo(); + /* Check for required GL version */ if (!GLEW_VERSION_2_0) {