![]() |
Home · All Classes |
The QCLContextGL class represents an OpenCL context that is suitable for use with OpenGL objects. More...
#include <QCLContextGL>Inherits QCLContext.
This class was introduced in QtOpenCL 4.7.
| QCLContextGL () | |
| ~QCLContextGL () | |
| QCLEvent | acquire ( const QCLMemoryObject & mem ) |
| QCLEvent | acquire ( const QCLMemoryObject & mem, const QCLEventList & after ) |
| bool | create ( const QCLPlatform & platform = QCLPlatform() ) |
| QCLBuffer | createGLBuffer ( GLuint bufobj, QCLMemoryObject::Access access ) |
| QCLBuffer | createGLBuffer ( QGLBuffer * bufobj, QCLMemoryObject::Access access ) |
| QCLImage2D | createRenderbuffer ( GLuint renderbuffer, QCLMemoryObject::Access access ) |
| QCLImage2D | createTexture2D ( GLenum type, GLuint texture, GLint mipmapLevel, QCLMemoryObject::Access access ) |
| QCLImage2D | createTexture2D ( GLuint texture, QCLMemoryObject::Access access ) |
| QCLImage3D | createTexture3D ( GLenum type, GLuint texture, GLint mipmapLevel, QCLMemoryObject::Access access ) |
| QCLImage3D | createTexture3D ( GLuint texture, QCLMemoryObject::Access access ) |
| QCLEvent | release ( const QCLMemoryObject & mem ) |
| QCLEvent | release ( const QCLMemoryObject & mem, const QCLEventList & after ) |
| bool | supportsObjectSharing () const |
| virtual void | release () |
| bool | isGLBuffer ( const QCLBuffer & buffer ) |
| bool | isRenderbuffer ( const QCLImage2D & image ) |
| bool | isTexture2D ( const QCLImage2D & image ) |
| bool | isTexture3D ( const QCLImage3D & image ) |
The QCLContextGL class represents an OpenCL context that is suitable for use with OpenGL objects.
Constructs a new OpenCL context object that is suitable for use with OpenGL objects.
Destroys this OpenCL context.
Acquires access to the OpenGL object behind the OpenCL memory object mem. This function must be called before performing an OpenCL operation on any OpenGL memory object.
Returns an event object that can be used to wait for the request to finish. The request is executed on the active command queue for this context.
See also release().
This is an overloaded function.
Acquires access to the OpenGL object behind the OpenCL memory object mem. This function must be called before performing an OpenCL operation on any OpenGL memory object.
The request will not start until all of the events in after have been signaled as finished.
Returns an event object that can be used to wait for the request to finish. The request is executed on the active command queue for this context.
See also release().
Creates an OpenCL context that is compatible with the current QGLContext and platform. Returns false if there is no OpenGL context current or the OpenCL context could not be created for some reason.
This function will first try to create a QCLDevice::GPU device, and will then fall back to QCLDevice::Default if a GPU is not found.
If platform is null, then the first platform that has a GPU will be used. If there is no GPU, then the first platform with a default device will be used.
See also supportsObjectSharing().
Creates an OpenCL memory buffer from the OpenGL buffer object bufobj, with the specified access mode.
This function will only work if supportsObjectSharing() is true.
This is an overloaded function.
Creates an OpenCL memory buffer from the OpenGL buffer object bufobj, with the specified access mode.
This function will only work if supportsObjectSharing() is true.
Creates a 2D OpenCL image object from the specified OpenGL renderbuffer object, and the access mode.
This function will only work if supportsObjectSharing() is true.
See also createTexture2D().
Creates a 2D OpenCL image object from the specified mipmapLevel, OpenGL texture object, and access mode.
The type must be one of GL_TEXTURE_2D, GL_TEXTURE_CUBE_MAP_POSITIVE_X, GL_TEXTURE_CUBE_MAP_POSITIVE_Y, GL_TEXTURE_CUBE_MAP_POSITIVE_Z, GL_TEXTURE_CUBE_MAP_NEGATIVE_X, GL_TEXTURE_CUBE_MAP_NEGATIVE_Y, GL_TEXTURE_CUBE_MAP_NEGATIVE_Z, or GL_TEXTURE_RECTANGLE. The texture does not need to be bound to an OpenGL texture target.
This function will only work if supportsObjectSharing() is true.
See also createTexture3D() and createRenderbuffer().
This is an overloaded function.
Creates a 2D OpenCL image object from the specified OpenGL texture object, and the access mode. If texture type is assumed to be GL_TEXTURE_2D and the mipmap level is assumed to be 0.
This function will only work if supportsObjectSharing() is true.
Creates a 3D OpenCL image object from the specified mipmapLevel, OpenGL texture object, and access mode.
The type must be GL_TEXTURE_3D. The texture does not need to be bound to an OpenGL texture target.
This function will only work if supportsObjectSharing() is true.
See also createTexture2D().
This is an overloaded function.
Creates a 3D OpenCL image object from the specified OpenGL texture object, and access mode. If texture type is assumed to be GL_TEXTURE_3D and the mipmap level is assumed to be 0.
This function will only work if supportsObjectSharing() is true.
Returns true if the OpenCL buffer object is also an OpenGL buffer object; false otherwise.
Returns true if the 2D OpenCL image object is also an OpenGL renderbuffer object; false otherwise.
See also isTexture2D().
Returns true if the 2D OpenCL image object is also an OpenGL 2D texture object; false otherwise.
See also isRenderbuffer() and isTexture3D().
Returns true if the 3D OpenCL image object is also an OpenGL 3D texture object; false otherwise.
See also isTexture2D().
Reimplemented from QCLContext::release().
Releases access to the OpenGL object behind the OpenCL memory object mem. This function must be called after performing an OpenCL operation on any OpenGL memory object, and before performing OpenGL operations on the object.
Returns an event object that can be used to wait for the request to finish. The request is executed on the active command queue for this context.
See also acquire().
This is an overloaded function.
Releases access to the OpenGL object behind the OpenCL memory object mem. This function must be called after performing an OpenCL operation on any OpenGL memory object, and before performing OpenGL operations on the object.
The request will not start until all of the events in after have been signaled as finished.
Returns an event object that can be used to wait for the request to finish. The request is executed on the active command queue for this context.
See also acquire().
Returns true if this OpenCL context supports object sharing with OpenGL; false otherwise.
See also createGLBuffer(), createTexture2D(), createTexture3D(), and createRenderbuffer().
| Copyright © 2010 Nokia Corporation | QtOpenCL Documentation |