| Home | Libraries | People | FAQ | More

## Class opengl_renderbuffer

boost::compute::opengl_renderbuffer

## Synopsis

    // In header: <boost/compute/interop/opengl/opengl_renderbuffer.hpp>

    class opengl_renderbuffer : public boost::compute::image_object {
    public:

      // public member functions
      opengl_renderbuffer();
      explicit opengl_renderbuffer(cl_mem, bool = true);
      opengl_renderbuffer(const context &, GLuint, cl_mem_flags = read_write);
      opengl_renderbuffer(const opengl_renderbuffer &);
      opengl_renderbuffer & operator=(const opengl_renderbuffer &);
      ~opengl_renderbuffer();
      extents< 2 > size() const;
      extents< 2 > origin() const;
      GLuint get_opengl_object() const;
      cl_gl_object_type get_opengl_type() const;
    };

## Description

A OpenCL buffer for accessing an OpenGL renderbuffer object.

### `opengl_renderbuffer` public member functions

1.     opengl_renderbuffer();

   Creates a null OpenGL renderbuffer object.

2.     explicit opengl_renderbuffer(cl_mem mem, bool retain = true);

   Creates a new OpenGL renderbuffer object for `mem`.

3.     opengl_renderbuffer(const context & context, GLuint renderbuffer,
                           cl_mem_flags flags = read_write);

   Creates a new OpenGL renderbuffer object in `context` for `renderbuffer` with `flags`.

   See the documentation for

4.     opengl_renderbuffer(const opengl_renderbuffer & other);

   Creates a new OpenGL renderbuffer object as a copy of `other`.

5.     opengl_renderbuffer & operator=(const opengl_renderbuffer & other);

   Copies the OpenGL renderbuffer object from `other`.

6.     ~opengl_renderbuffer();

   Destroys the OpenGL buffer object.

7.     extents< 2 > size() const;

   Returns the size (width, height) of the renderbuffer.

8.     extents< 2 > origin() const;

   Returns the origin of the renderbuffer (`0`, `0`).

9.     GLuint get_opengl_object() const;

   Returns the OpenGL memory object ID.

   See the documentation for

10.     cl_gl_object_type get_opengl_type() const;

    Returns the OpenGL memory object type.

    See the documentation for