CUresult cuGLCtxCreate ( CUcontext pCtx,
unsigned int  Flags,
CUdevice  device 
)

Creates a new CUDA context, initializes OpenGL interoperability, and associates the CUDA context with the calling thread. It must be called before performing any other OpenGL interoperability operations. It may fail if the needed OpenGL driver facilities are not available. For usage of the Flags parameter, see cuCtxCreate().

Parameters:
pCtx - Returned CUDA context
Flags - Options for CUDA context creation
device - Device on which to create the context
Returns:
CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_CONTEXT, CUDA_ERROR_INVALID_VALUE, CUDA_ERROR_OUT_OF_MEMORY
Note:
Note that this function may also return error codes from previous, asynchronous launches.
See also:
cuCtxCreate, cuGLInit, cuGLMapBufferObject, cuGLRegisterBufferObject, cuGLUnmapBufferObject, cuGLUnregisterBufferObject, cuGLMapBufferObjectAsync, cuGLUnmapBufferObjectAsync, cuGLSetBufferObjectMapFlags, cuWGLGetDevice


Generated by Doxygen for NVIDIA CUDA Library  NVIDIA