Simple CUDA Code To Display Images to the Screen?


I want generate images and display them on the screen, all from CUDA. I’m running on a Linux machine (CentOS) so my understanding is that I will have to do this via OpenGL. Is this correct?

The CUDA Programmer’s Guide mentions this, but doesn’t go into detail, and their example code doesn’t work for me. Does anyone have starter code for this? In order to start, I’d like a simple CUDA program that can generate a simple image and display it on the screen. Can someone send me a pointer for this?

Thank you.