|
cuGLRegisterImage |
( |
GLuint |
image, |
|
|
GLenum |
target, |
|
|
unsigned int |
Flags, |
|
|
CUinteropObject * |
hObject | |
|
) |
| | |
Registers the texture or renderbuffer specified by image for access by CUDA. target must match the type of the object. A handle to the registered object is returned as hObject . The map flags Flags specify the intended usage, as follows:
- CU_GL_MAP_RESOURCE_FLAGS_NONE: Specifies no hints about how this resource will be used. It is therefore assumed that this resource will be read from and written to by CUDA kernels. This is the default value.
- CU_GL_MAP_RESOURCE_FLAGS_READ_ONLY: Specifies that CUDA kernels which access this resource will not write to this resource.
- CU_GL_MAP_RESOURCE_FLAGS_WRITE_DISCARD: Specifies that CUDA kernels which access this resource will not read from this resource and will write over the entire contents of the resource, so none of the data previously stored in the resource will be preserved.
- Parameters:
-
| image | - name of texture or renderbuffer to be registered |
| target | - Identifies the type of object specified by image , and must be one of GL_TEXTURE_2D, GL_TEXTURE_CUBE_MAP, GL_TEXTURE_3D, GL_TEXTURE_2D_ARRAY, or GL_RENDERBUFFER. |
| Flags | - Map flags |
| hObject | - Pointer to the returned object handle |
- Returns:
- CUDA_SUCCESS, CUDA_ERROR_INVALID_HANDLE, CUDA_ERROR_ALREADY_MAPPED, CUDA_ERROR_INVALID_CONTEXT,
- Note:
- Note that this function may also return error codes from previous, asynchronous launches.
- See also:
- cuGLCtxCreate, cuGLInit, cuGLMapBufferObject, cuGLRegisterBufferObject, cuGLUnregisterBufferObject, cuGLUnmapBufferObject, cuGLMapBufferObjectAsync, cuGLUnmapBufferObjectAsync, cuWGLGetDevice
|