=== modified file 'src/glcompbench.cc'
@@ -142,6 +142,9 @@
int
main(int argc, char **argv)
{
+#ifdef USE_GLPROXY
+ glProxyContext *proxy_context;
+#endif
std::list<CompositeCanvas *> canvas_list;
canvas_list.push_back(new CompositeCanvasPixman());
canvas_list.push_back(new CompositeCanvasXRender());
@@ -160,15 +163,20 @@
#ifdef USE_GLPROXY
// Initialize the proxy library and create the correct GL canvas
- PROXY_BACKEND_OPTION backend = UNKNOWN_BACKEND;
+ proxy_context = glProxyInit();
if (Options::backend == Options::BACKEND_GLX) {
- backend = OPENGL_BACKEND;
- glProxyInit(&backend);
+ if (!glProxyLoad(proxy_context, GLPROXY_BACKEND_GLX_OPENGL))
+ return -1;
canvas_list.push_back(new CompositeCanvasGLX());
} else if (Options::backend == Options::BACKEND_EGL_ES2) {
- backend = OPENGL_ES20_BACKEND;
- glProxyInit(&backend);
+ if (!glProxyLoad(proxy_context, GLPROXY_BACKEND_EGL_OPENGLES2))
+ return -1;
+
+ canvas_list.push_back(new CompositeCanvasEGL());
+ } else if (Options::backend == Options::BACKEND_EGL_GL) {
+ if (!glProxyLoad(proxy_context, GLPROXY_BACKEND_EGL_OPENGL))
+ return -1;
canvas_list.push_back(new CompositeCanvasEGL());
} else {
@@ -263,5 +271,8 @@
}
+#ifdef USE_GLPROXY
+ glProxyClose(proxy_context);
+#endif
return 0;
}
=== modified file 'src/options.cc'
@@ -72,7 +72,7 @@
};
#ifdef USE_GLPROXY
-static const char *available_backends = "glx, egl-es2";
+static const char *available_backends = "glx, egl-es2, egl-gl";
#elif defined(USE_GLX)
static const char *available_backends = "glx";
#elif defined(USE_EGL) && defined(USE_GL)