...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_texture
// In header: <boost/compute/interop/opengl/opengl_texture.hpp> class opengl_texture : public boost::compute::image_object { public: // construct/copy/destruct opengl_texture(); explicit opengl_texture(cl_mem, bool = true); opengl_texture(const context &, GLenum, GLint, GLuint, cl_mem_flags = read_write); opengl_texture(const opengl_texture &); opengl_texture & operator=(const opengl_texture &); ~opengl_texture(); // public member functions extents< 2 > size() const; extents< 2 > origin() const; template<typename T> T get_texture_info(cl_gl_texture_info) const; };
A OpenCL image2d for accessing an OpenGL texture object.
opengl_texture
public
construct/copy/destructopengl_texture();Creates a null OpenGL texture object.
explicit opengl_texture(cl_mem mem, bool retain = true);Creates a new OpenGL texture object for
mem
. opengl_texture(const context & context, GLenum texture_target, GLint miplevel, GLuint texture, cl_mem_flags flags = read_write);
Creates a new OpenGL texture object in context
for texture
with flags
.
See the documentation for clCreateFromGLTexture() for more information.
opengl_texture(const opengl_texture & other);Creates a new OpenGL texture object as a copy of
other
. opengl_texture & operator=(const opengl_texture & other);Copies the OpenGL texture object from
other
. ~opengl_texture();Destroys the texture object.
opengl_texture
public member functionsextents< 2 > size() const;Returns the size (width, height) of the texture.
extents< 2 > origin() const;Returns the origin of the texture (
0
, 0
). template<typename T> T get_texture_info(cl_gl_texture_info info) const;
Returns information about the texture.
See the documentation for clGetGLTextureInfo() for more information.