diff options
author | Ludovic Pouzenc <ludovic@pouzenc.fr> | 2013-01-15 21:11:52 +0000 |
---|---|---|
committer | Ludovic Pouzenc <ludovic@pouzenc.fr> | 2013-01-15 21:11:52 +0000 |
commit | 9cc7c11a75db6ed8a461b4d3dc5bf6f2ce8ae3db (patch) | |
tree | 44ca67b901c02c3f7294ecc97e7b19d2ada21192 /src | |
parent | 01a5c00f275a2f7de181e2c8ab39095d1aacdf4a (diff) | |
download | 2013-gpudataviz-9cc7c11a75db6ed8a461b4d3dc5bf6f2ce8ae3db.tar.gz 2013-gpudataviz-9cc7c11a75db6ed8a461b4d3dc5bf6f2ce8ae3db.tar.bz2 2013-gpudataviz-9cc7c11a75db6ed8a461b4d3dc5bf6f2ce8ae3db.zip |
Avancee sur l'interop GL/CL
git-svn-id: file:///var/svn/2013-gpudataviz/trunk@8 371a6b4a-a258-45f8-9dcc-bdd82ce0ac9d
Diffstat (limited to 'src')
-rw-r--r-- | src/boring_parts.cc | 24 |
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, |