Has anyone tried programming the nvidia cuda enabled GPUs directly from openframeworks? i would imagine it shouldn’t be too difficult integrating the two, since cuda is c-based…
yes, it should not be too hard to integrate (aka writting some wrapper classes), because it is C and multiplatform. but seriously, what for?
i mean, don’t get me wrong, i would love to since GPUs are very fast.
but this needs a total different understanding of (parallel) problems and solutions (=algorithms) and the ability to combine the result with other (depending) output.
CUDA is a great tool in the domain of (offline) signal/image processing but it is also not trivial to use because of the different approach. and since openframeworks is more geared towards the “creative-and-not-scientific-coder-but-c+±beginner” i really doubt the purpose.
still, i would glad to check and review something that comes down the road
I completely agree with didito on this one. I attended a class on CUDA programming and left after about 45 minutes because of the lack of relevance to media arts type work. CUDA adds syntax and keywords to C and is really only appropriate for particular types of problems that are decomposable into parallel units. From the code I saw, all I could think of was “this will be obsolete in about 2 years, why would I waste my time learning this and having it be a thorn in my side”.
That said, you can do this type of programming with shaders and have your code still work on most hardware and be screaming fast. If you’re interested in GPGPU, make sure you get a graphics card with good floating point texture support. The next step is to build a framework for yourself consisting of the following:
- unclamped floating point texture support
- a class for managing shaders (in this case you will be focusing on fragment shaders)
- an extended shader class to manage frame buffer objects and drawing fullscreen quads so that each pixel put to screen corresponds to an FBO pixel. This type of operation is generally referred to as a Slab. Once you have the first 2 in place, this last item is fairly straightforward. The trick is handling multi-texturing and advanced operations like multiple render targets.
thanks for the replies…
they were enlightening!
I guess I’ll start reading on shaders…