Simpler OpenGL sample

I am looking for the most lightweight method of drawing lines in a CUDA environment, but otherwise doing everything else in CUDA. I am coming from a Direct3D app, but I think D3D interop will be too intrusive for my task (requires window, desktop available, etc.)

I have very little experience with OpenGL. I was hoping to find a sample that is more in line with what I’m trying to do (keep results of rendering in CUDA buffer, instead of render them to a window with OpenGL). Is this even possible? If I need to render to an OpenGL buffer, then copy that back to a cuda buffer, that is OK.