OpenGL interoperability#
- 
hipError_t hipGLGetDevices(unsigned int *pHipDeviceCount, int *pHipDevices, unsigned int hipDeviceCount, hipGLDeviceList deviceList)#
- Queries devices associated with the current OpenGL context. - Parameters:
- pHipDeviceCount – [out] - Pointer of number of devices on the current GL context. 
- pHipDevices – [out] - Pointer of devices on the current OpenGL context. 
- hipDeviceCount – [in] - Size of device. 
- deviceList – [in] - The setting of devices. It could be either hipGLDeviceListCurrentFrame for the devices used to render the current frame, or hipGLDeviceListAll for all devices. The default setting is Invalid deviceList value. 
 
- Returns:
- hipSuccess, hipErrorInvalidValue, hipErrorNotSupported 
 
- 
hipError_t hipGraphicsGLRegisterBuffer(hipGraphicsResource **resource, GLuint buffer, unsigned int flags)#
- Registers a GL Buffer for interop and returns corresponding graphics resource. - Parameters:
- resource – [out] - Returns pointer of graphics resource. 
- buffer – [in] - Buffer to be registered. 
- flags – [in] - Register flags. 
 
- Returns:
- hipSuccess, hipErrorInvalidValue, hipErrorUnknown, hipErrorInvalidResourceHandle 
 
- 
hipError_t hipGraphicsGLRegisterImage(hipGraphicsResource **resource, GLuint image, GLenum target, unsigned int flags)#
- Register a GL Image for interop and returns the corresponding graphic resource. - Parameters:
- resource – [out] - Returns pointer of graphics resource. 
- image – [in] - Image to be registered. 
- target – [in] - Valid target value Id. 
- flags – [in] - Register flags. 
 
- Returns:
- hipSuccess, hipErrorInvalidValue, hipErrorUnknown, hipErrorInvalidResourceHandle