print the GL version in use
authorRalf Jung <post@ralfj.de>
Sun, 8 Sep 2013 19:37:10 +0000 (21:37 +0200)
committerRalf Jung <post@ralfj.de>
Sun, 8 Sep 2013 19:37:10 +0000 (21:37 +0200)
eglbackend.cpp
glwindow.cpp
glxbackend.cpp

index 0d5e5e60f14731db48a3eb0c66ab7239195611e6..cbe724cff375cbb5e22329d4f593bfdd437102ca 100644 (file)
@@ -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");
                        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);
                if (eglMajor == 1 && eglMinor < 3) {
                        fprintf(stderr, "Need at least EGL 1.3 to function properly\n");
                        exit(1);
index ca6dbb95018d91fa416360a542fe32edc1c0ac33..64d007575bf2e9dc6310e057c27a0fdecc5849f9 100644 (file)
@@ -17,6 +17,7 @@
  */
 
 #include "glwindow.h"
  */
 
 #include "glwindow.h"
+#include "glutil.h"
 
 #include <assert.h>
 #include <X11/Xutil.h>
 
 #include <assert.h>
 #include <X11/Xutil.h>
@@ -60,6 +61,7 @@ void GLWindow::create(unsigned int width, unsigned int height)
        this->width = width;
        this->height = height;
        backend->createContext(window);
        this->width = width;
        this->height = height;
        backend->createContext(window);
+       printf("Using GL version: %s\n", glGetString(GL_VERSION));
        initGL();
        resizeGL(width, height);
 }
        initGL();
        resizeGL(width, height);
 }
index 97e6937c4ed76e260fe7b67faf53b9c17751832f..b2383826b66c257090493d5c530f09f27b2aa6c9 100644 (file)
@@ -45,7 +45,7 @@ VisualID GLXBackend::initialize(Display *display)
                // debugging: show version information
                int glxMajor, glxMinor;
                glXQueryVersion(display, &glxMajor, &glxMinor);
                // 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) {
                // check for swap control functions
                const char *extensions = glXQueryExtensionsString(display, DefaultScreen(display));
                if (std::string(extensions).find("GLX_MESA_swap_control") != std::string::npos) {