From: Ralf Jung Date: Sun, 8 Sep 2013 19:37:10 +0000 (+0200) Subject: print the GL version in use X-Git-Url: https://git.ralfj.de/gltest.git/commitdiff_plain/a0cb14324fbd2791d62df09e8d10541f280b60ee?ds=inline print the GL version in use --- diff --git a/eglbackend.cpp b/eglbackend.cpp index 0d5e5e6..cbe724c 100644 --- a/eglbackend.cpp +++ b/eglbackend.cpp @@ -81,7 +81,7 @@ VisualID EGLBackend::initialize(Display *xDisplay) exitEglError("Failed to get EGL display"); if (eglInitialize(display, &eglMajor, &eglMinor) == EGL_FALSE) exitEglError("Failed to initialize EGL"); - printf("Using EGL version %d.%d\n", eglMajor, eglMinor); + printf("Using EGL version: %d.%d\n", eglMajor, eglMinor); if (eglMajor == 1 && eglMinor < 3) { fprintf(stderr, "Need at least EGL 1.3 to function properly\n"); exit(1); diff --git a/glwindow.cpp b/glwindow.cpp index ca6dbb9..64d0075 100644 --- a/glwindow.cpp +++ b/glwindow.cpp @@ -17,6 +17,7 @@ */ #include "glwindow.h" +#include "glutil.h" #include #include @@ -60,6 +61,7 @@ void GLWindow::create(unsigned int width, unsigned int height) this->width = width; this->height = height; backend->createContext(window); + printf("Using GL version: %s\n", glGetString(GL_VERSION)); initGL(); resizeGL(width, height); } diff --git a/glxbackend.cpp b/glxbackend.cpp index 97e6937..b238382 100644 --- a/glxbackend.cpp +++ b/glxbackend.cpp @@ -45,7 +45,7 @@ VisualID GLXBackend::initialize(Display *display) // debugging: show version information int glxMajor, glxMinor; glXQueryVersion(display, &glxMajor, &glxMinor); - printf("Using GLX version %d.%d\n", glxMajor, glxMinor); + printf("Using GLX version: %d.%d\n", glxMajor, glxMinor); // check for swap control functions const char *extensions = glXQueryExtensionsString(display, DefaultScreen(display)); if (std::string(extensions).find("GLX_MESA_swap_control") != std::string::npos) {