| 231 | } |
| 232 | |
| 233 | void cleanup() |
| 234 | { |
| 235 | sdkDeleteTimer(&timer); |
| 236 | |
| 237 | // add extra check to unmap the resource before unregistering it |
| 238 | if (g_GraphicsMapFlag) { |
| 239 | checkCudaErrors(cudaGraphicsUnmapResources(1, &cuda_pbo_resource, 0)); |
| 240 | g_GraphicsMapFlag--; |
| 241 | } |
| 242 | |
| 243 | // unregister this buffer object from CUDA C |
| 244 | checkCudaErrors(cudaGraphicsUnregisterResource(cuda_pbo_resource)); |
| 245 | glDeleteBuffers(1, &pbo); |
| 246 | cleanupCuda(); |
| 247 | } |
| 248 | |
| 249 | void initGLBuffers() |
| 250 | { |
nothing calls this directly
no test coverage detected