However, after battling with several CUDA implementations (I do not believe my knowledge of the inner workings of CUDA at this point to properly be able to extend an SPH or particle simulation first) I decided it would be best to integrate and modify an existing and more object oriented CPU implementation.
In the meantime, I have set up my simulation framework and UI complete with a camera, FPS tracker, image recorder, and sliders to control simple simulation parameters in the near future. In addition, I set up a particle renderer to allow for multiple modes of rendering the particles (I anticipate having several debug "modes" for rendering particles from viewing pressures, velocities, etc in particles, as well as a framework to be able to use different shaders for particle rendering).
Although SPH is not fully integrated so the renderer isn't full connected to the proposed particle system, I tapped into my novice shader GPU skillz to make some sample VBO's to hold color and the particle positions, and attached them to the renderer to see how it would work. I stole a lot of the shading code from both the Nvidia particles sample, and Jon's shader loader from CIS565, mostly because I liked the idea of having direct control of the different shaders and because as I have learned in GPU, immediate mode is deprecated and awful so I might as well start learning how to do it correctly now before I solidify some bad habits.
Here is a video of the simple framework:
More to come soon as I finish modifying and integrating the SPH framework and renderer.
Terry, nice job with your project and blog so far. I'm glad you are applying things from CIS 565. If you want to make sure you are not using any deprecated OpenGL features, you can request the "core profile" when you create your OpenGL 3 context. I'm looking forward to your CUDA implementation.
ReplyDelete