Some more Makefile magic to avoid repeating the source files which make up a binary
[gltest.git] / glxbackend.cpp
index 97e6937c4ed76e260fe7b67faf53b9c17751832f..3ebc8789116df308498d936260124b3ab8e275b3 100644 (file)
@@ -17,6 +17,7 @@
  */
 
 #include "glxbackend.h"
+#include "glutil.h"
 
 #include <stdio.h>
 #include <assert.h>
@@ -45,7 +46,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) {
@@ -76,6 +77,9 @@ void GLXBackend::createContext(Window window)
        context = glXCreateContext(display, vi, 0, GL_TRUE);                             
        glXMakeCurrent(display, window, context);                                      
        assert(glXIsDirect(display, context));
+       printf("Using GL version: %s\n", glGetString(GL_VERSION));
+       // initialise GL utilities
+       resolveFunctionPointers((T_glGetProcAddress)glXGetProcAddress);
 }
 
 GLXBackend::~GLXBackend()