cuGLSetBufferObjectMapFlags ( GLuint  bufferobj,
unsigned int  Flags 
)

Sets the map flags for the registered buffer object of ID bufferobj.

Changes to Flags will take effect the next time bufferobj is mapped. The Flags argument may be any of the following:

  • 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.

If bufferobj has not been registered for use with CUDA, then CUDA_ERROR_INVALID_HANDLE is returned. If bufferobj is presently mapped for access by CUDA, then CUDA_ERROR_ALREADY_MAPPED is returned.

Parameters:
bufferobj - Buffer object to unmap
Flags - Map flags
Returns:
CUDA_SUCCESS, CUDA_ERROR_NOT_INITIALIZED, 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


Generated by Doxygen for NVIDIA CUDA Library  NVIDIA