...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
boost::compute::opengl_buffer
// In header: <boost/compute/interop/opengl/opengl_buffer.hpp> class opengl_buffer : public buffer { public: // construct/copy/destruct opengl_buffer(); explicit opengl_buffer(cl_mem, bool = true); opengl_buffer(const context &, GLuint, cl_mem_flags = read_write); opengl_buffer(const opengl_buffer &); opengl_buffer & operator=(const opengl_buffer &); ~opengl_buffer(); // public member functions GLuint get_opengl_object() const; cl_gl_object_type get_opengl_type() const; };
A OpenCL buffer for accessing an OpenGL memory object.
opengl_buffer
public
construct/copy/destructopengl_buffer();Creates a null OpenGL buffer object.
explicit opengl_buffer(cl_mem mem, bool retain = true);Creates a new OpenGL buffer object for
mem
. opengl_buffer(const context & context, GLuint bufobj, cl_mem_flags flags = read_write);
Creates a new OpenGL buffer object in context
for bufobj
with flags
.
See the documentation for
opengl_buffer(const opengl_buffer & other);Creates a new OpenGL buffer object as a copy of
other
. opengl_buffer & operator=(const opengl_buffer & other);Copies the OpenGL buffer object from
other
. ~opengl_buffer();Destroys the OpenGL buffer object.