Function set_gl_device_def

Source
pub fn set_gl_device_def() -> Result<()>
Expand description

Sets a CUDA device and initializes it for the current thread with OpenGL interoperability.

This function should be explicitly called after OpenGL context creation and before any CUDA calls.

§Parameters

  • device: System index of a CUDA device starting with 0. @ingroup core_opengl

§Note

This alternative version of set_gl_device function uses the following default values for its arguments:

  • device: 0