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":

#include <cutil_gl_inline.h>

#include <cuda_gl_interop.h>

 

AttachmentSize
articleVBO.zip280.94 KB
Vlad
Offline
Joined: 03/01/2011
in my experience, while

in my experience, while working on my new GTA2 map editor I was drawing the level with VBO's and used VBO + CUDA.
so after creating the vbo,I moved vertexes with cuda which can access the video card memory and not do the whole transfer from RAM to VideoRAM again. this can be done without cuda, I just havent tried it but im sure there are tutorials in the web.

lancerohn
Offline
Joined: 06/22/2011
Using Vertex Buffer

This particular signal demonstrates how you can pull Three dimensional points, wireframe as well as areas using the framework described in Part fifteen associated with my Physician Dobb's article Utilizing Pixel Barrier Objects along with CUDA and OpenGL. We remaining in some ifdef claims so you are able to confirm with regard to your self the actual speed of utilizing Simple Restart in order to avoid PCI bus bandwidth restrictions. By Vyas, Best Paint Sprayers