OpenCL C++ Wrapper API 1.1
 All Classes Namespaces Files Functions Variables Typedefs Defines
Public Member Functions
cl::BufferGL Class Reference

Memory buffer interface for GL interop. More...

#include <cl.hpp>

Inheritance diagram for cl::BufferGL:
cl::Buffer cl::Memory cl::detail::Wrapper< cl_mem >

List of all members.

Public Member Functions

 BufferGL (const Context &context, cl_mem_flags flags, GLuint bufobj, cl_int *err=NULL)
 BufferGL ()
 BufferGL (const BufferGL &buffer)
 BufferGL (const cl_mem &buffer)
BufferGLoperator= (const BufferGL &rhs)
BufferGLoperator= (const cl_mem &rhs)
cl_int getObjectInfo (cl_gl_object_type *type, GLuint *gl_object_name)

Detailed Description

Memory buffer interface for GL interop.

Definition at line 2192 of file cl.hpp.


Constructor & Destructor Documentation

cl::BufferGL::BufferGL ( const Context context,
cl_mem_flags  flags,
GLuint  bufobj,
cl_int *  err = NULL 
) [inline]

Definition at line 2195 of file cl.hpp.

    {
        cl_int error;
        object_ = ::clCreateFromGLBuffer(
            context(),
            flags,
            bufobj,
            &error);

        detail::errHandler(error, __CREATE_GL_BUFFER_ERR);
        if (err != NULL) {
            *err = error;
        }
    }
cl::BufferGL::BufferGL ( ) [inline]

Definition at line 2214 of file cl.hpp.

: Buffer() { }
cl::BufferGL::BufferGL ( const BufferGL buffer) [inline]

Definition at line 2216 of file cl.hpp.

: Buffer(buffer) { }
cl::BufferGL::BufferGL ( const cl_mem &  buffer) [inline]

Definition at line 2218 of file cl.hpp.

: Buffer(buffer) { }

Member Function Documentation

cl_int cl::BufferGL::getObjectInfo ( cl_gl_object_type *  type,
GLuint *  gl_object_name 
) [inline]

Definition at line 2234 of file cl.hpp.

    {
        return detail::errHandler(
            ::clGetGLObjectInfo(object_,type,gl_object_name),
            __GET_GL_OBJECT_INFO_ERR);
    }
BufferGL& cl::BufferGL::operator= ( const BufferGL rhs) [inline]

Definition at line 2220 of file cl.hpp.

    {
        if (this != &rhs) {
            Buffer::operator=(rhs);
        }
        return *this;
    }
BufferGL& cl::BufferGL::operator= ( const cl_mem &  rhs) [inline]

Reimplemented from cl::Buffer.

Definition at line 2228 of file cl.hpp.

    {
        Buffer::operator=(rhs);
        return *this;
    }

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Defines