tests/cuda2.2/tests/SimpleGL/simpleGL.cpp
void runCuda(GLuint vbo)
{
    // map OpenGL buffer object for writing from CUDA
    float4 *dptr;
    cutilSafeCall(cudaGLMapBufferObject((void**)&dptr, vbo));

    // execute the kernel
//    dim3 block(8, 8, 1);
//    dim3 grid(mesh_width / block.x, mesh_height / block.y, 1);
//    kernel<<< grid, block>>>(dptr, mesh_width, mesh_height, anim);

    launch_kernel(dptr, mesh_width, mesh_height, anim);

    // unmap buffer object
    cutilSafeCall(cudaGLUnmapBufferObject(vbo));
}
////////////////////////////////////////////////////////////////////////////////
//! Run the Cuda part of the computation
////////////////////////////////////////////////////////////////////////////////
Run the Cuda part of the computation
Run the Cuda part of the computation
void runCuda(GLuint vbo)
{
    float4 *dptr;
    cutilSafeCall(cudaGLMapBufferObject((void**)&dptr, vbo));
    launch_kernel(dptr, mesh_width, mesh_height, anim);
    cutilSafeCall(cudaGLUnmapBufferObject(vbo));
}
void runCuda ( GLuint vbo ) { float4 * dptr ; cutilSafeCall ( cudaGLMapBufferObject ( ( void * * ) & dptr , vbo ) ) ; launch_kernel ( dptr , mesh_width , mesh_height , anim ) ; cutilSafeCall ( cudaGLUnmapBufferObject ( vbo ) ) ; }
Run the Cuda part of the computation
Run the Cuda part of the computation
// map OpenGL buffer object for writing from CUDA // execute the kernel //    dim3 block(8, 8, 1); //    dim3 grid(mesh_width / block.x, mesh_height / block.y, 1); //    kernel<<< grid, block>>>(dptr, mesh_width, mesh_height, anim); // unmap buffer object