Add support for OpenGL 3 contexts
[gltest.git] / glxbackend.h
index 1e75cc8fd02fc6f5167de20f81b16b27880514d3..a16f970c1fb72398ff26589f954e5d700706b4c4 100644 (file)
  */
 
 #include "glwindow.h"
+#include "glutil.h"
 
 #include <GL/glx.h>
+#include <string>
 
 
 /** Make an X window fit for GL. You have to manage the X window yourself! */
@@ -42,10 +44,14 @@ public:
        virtual void setSwapInterval(int i) const;
 private:
        Display *display;
-       XVisualInfo *vi;
+       GLXFBConfig config;
        GLXContext context;
        Window window;
        
        PFNGLXSWAPINTERVALMESAPROC funSwapIntervalMesa;
        PFNGLXSWAPINTERVALEXTPROC funSwapIntervalExt;
+       PFNGLXCREATECONTEXTATTRIBSARBPROC funCreateContextAttribsARB;
+       
+       bool haveGLXExtension(const std::string &name);
+       T_proc resolveGLXFunction(const char *extension, const char *function);
 };