Some more Makefile magic to avoid repeating the source files which make up a binary
[gltest.git] / eglbackend.cpp
index 0d5e5e60f14731db48a3eb0c66ab7239195611e6..ef27997391856b882859bb57b4259ba6440123fc 100644 (file)
@@ -17,6 +17,7 @@
  */
 
 #include "eglbackend.h"
+#include "glutil.h"
 
 #include <stdlib.h>
 #include <stdio.h>
@@ -81,7 +82,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);
@@ -120,6 +121,9 @@ void EGLBackend::createContext(Window window)
                exitEglError("Failed to create context");
        if (eglMakeCurrent(display, surface, surface, context) == EGL_FALSE)
                exitEglError("Failed to make context current");
+       printf("Using GL version: %s\n", glGetString(GL_VERSION));
+       // initialise GL utilities
+       resolveFunctionPointers(eglGetProcAddress);
 }
 
 EGLBackend::~EGLBackend()