cudaError_t cudaGraphicsGLRegisterImage ( struct cudaGraphicsResource **  resource,
GLuint  image,
GLenum  target,
unsigned int  flags 
)

Registers the texture or renderbuffer object specified by image for access by CUDA. target must match the type of the object. A handle to the registered object is returned as resource. The register flags flags specify the intended usage, as follows:

The following image classes are currently disallowed:

  • Textures with borders
  • Multisampled renderbuffers

Parameters:
resource - Pointer to the returned object handle
image - name of texture or renderbuffer object to be registered
target - Identifies the type of object specified by image, and must be one of GL_TEXTURE_2D, GL_TEXTURE_RECTANGLE, GL_TEXTURE_CUBE_MAP, GL_TEXTURE_3D, GL_TEXTURE_2D_ARRAY, or GL_RENDERBUFFER.
flags - Register flags
Returns:
cudaSuccess, cudaErrorInvalidDevice, cudaErrorInvalidValue, cudaErrorInvalidResourceHandle, cudaErrorUnknown
Note:
Note that this function may also return error codes from previous, asynchronous launches.
See also:
cudaGLSetGLDevice cudaGraphicsUnregisterResource, cudaGraphicsMapResources, cudaGraphicsSubResourceGetMappedArray


Generated by Doxygen for NVIDIA CUDA Library  NVIDIA