summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/boring_parts.cc24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/boring_parts.cc b/src/boring_parts.cc
index e28f20b..bc25f8f 100644
--- a/src/boring_parts.cc
+++ b/src/boring_parts.cc
@@ -112,7 +112,31 @@ int initOpenCL() {
std::cout << "Failed to query proc address for clGetGLContextInfoKHR";
}
}
+
+ std::cout << "glXCreateContextAttribsARB "
+ << (void*) glXGetProcAddress((const GLubyte*)"glXCreateContextAttribsARB")
+ << std::endl;
+
+ GLXCREATECONTEXTATTRIBSARBPROC glXCreateContextAttribsARB = (GLXCREATECONTEXTATTRIBSARBPROC)
+ glXGetProcAddress((const GLubyte*)"glXCreateContextAttribsARB");
+
+ int attribs[] = {
+ GLX_CONTEXT_MAJOR_VERSION_ARB, 3,
+ GLX_CONTEXT_MINOR_VERSION_ARB, 0,
+ 0
+ };
+
+ GLXContext ctx = glXCreateContextAttribsARB(displayName, *fbc, 0, true, attribs);
*/
+
+
+/*
+ Ici, le contexte OpenGL du widget MyGTKGLSceneWidget est nécessaire.
+
+ http://developer.gnome.org/gtkglext/stable/gtkglext-gdkglcontext.html
+ glXMakeCurrent (displayName, win, ctx);
+ */
+
GLXContext gGlCtx = glXGetCurrentContext();
std::cout << "gGlCtx == " << gGlCtx << std::endl;
cl_context_properties cpsGL[] = { CL_CONTEXT_PLATFORM, (cl_context_properties)platform,