Using Vertex Buffer Objects with CUDA and very fast surface rendering with primitive restart
Following is the source for the Doctor Dobb's Journal article for a future article entitled Using Vertex Buffer Objects with CUDA and OpenGL. This source includes Microsoft Visual Studio build files as well as a Linux command-line to build an executable.
This code demonstrates how to draw 3D points, wireframe and surfaces using the framework described in Part 15 of my Doctor Dobb's article Using Pixel Buffer Objects with CUDA and OpenGL. I left in some ifdef statements so you can verify for yourself the speed of using Primitive Restart to bypass PCI bus bandwidth limitations.
Many thanks to Joe Stam at NVIDIA for providing the Visual Studio build files. Joe also notes you need to remove the following lines from perlinKernelVBO.cu and change the uint variable in runCUDA to "unsigned int":