'How do I use graphics functions in CUDA?

I want to use basic functions like putpixel, initwindow in CUDA. How do I do it?



Solution 1:[1]

I would rather use the CUDA - OpenGL interop to visualize results from CUDA, see e.g. http://3dgep.com/opengl-interoperability-with-cuda/

Solution 2:[2]

CUDA cannot output directly to a window backbuffer. However, you can still use CUDA to write to a texture or a buffer and then use the results to visualize it in OpenGL. For a thorough example on how to do this, please refer to this project:

https://github.com/nvpro-samples/gl_cuda_interop_pingpong_st

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1
Solution 2 ds-bos-msk