Hi,
We have a real time graphics course in the uni where we have to programme a demo. The graphics rendering has to be done either in OpenGL or Direct3d. I was thinking of implementing some additional effects in CUDA and then using its interop functions to transfer the stuff to opengl.
But the teacher voiced concerns, that switching from opengl to cuda and back could be too slow, or at least would take away valuable time. We have to produce at least 60 frames per second. As an alternative he proposed compute shaders. I want to use output from opengl in cuda and then draw it again with opengl, so it would be really 2 switches.
I have no experience with compute shaders, and as far as I can tell, they are limited compared to cuda, lacking language features (classes, data structures, libs), debugging and profiling possibilities. But on the other hand, it would be probably enough for what I need.
So the main question is, whether the time needed for switching would be considerable in this scenario.
I found this on the forums CUDA Kernel or OpenGL Compute Shader? - CUDA Programming and Performance - NVIDIA Developer Forums, but they are talking about path tracing, which is not real time most often.