print the GL version in use
[gltest.git] / glwindow.cpp
index 2d796391f145ee37166ee018826684024b4ec34f..64d007575bf2e9dc6310e057c27a0fdecc5849f9 100644 (file)
@@ -17,6 +17,7 @@
  */
 
 #include "glwindow.h"
+#include "glutil.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);
+       printf("Using GL version: %s\n", glGetString(GL_VERSION));
        initGL();
        resizeGL(width, height);
 }
@@ -124,8 +126,6 @@ void GLWindow::exec()
                                        if (strcmp(XGetAtomName(display, event.xclient.message_type), "WM_PROTOCOLS") == 0 &&
                                                strcmp(XGetAtomName(display, event.xclient.data.l[0]), "WM_DELETE_WINDOW") == 0)
                                        {
-                                               XDestroyWindow(display, window);
-                                               window = 0;
                                                return;
                                        }
                                        break;