...one of the most highly
regarded and expertly designed C++ library projects in the
world. — Herb Sutter and Andrei
Boost.Compute provides a number of facilities to ease interoperability with other C and C++ libraries including OpenGL, OpenCV, Eigen, Qt, and VTK.
All of the interop headers are located in the
OpenGL is a standard API for 3D graphics and closely related to OpenCL.
Boost.Compute provides an easy way to create a shared OpenCL/OpenGL context
function. This creates a Boost.Compute
object which can be used to create OpenCL memory buffers corresponding to
OpenGL memory objects (such as VBOs). This allows for OpenCL kernels to read
and write data which is then used directly for rendering with OpenGL.
Boost.Compute provides a few classes to manage OpenGL objects and make them
accessible to OpenCL. These include
(for OpenGL memory objects) and
(for OpenGL texture objects).
Control of shared OpenCL/OpenGL memory objects is transfered between OpenCL
and OpenGL using the
See the OpenCL documentation for the cl_khr_gl_sharing extension for more information.