MCPcopy Create free account
hub / github.com/NVIDIA/cuda-samples / render

Function render

cpp/3_CUDA_Features/bindlessTexture/bindlessTexture.cpp:123–136  ·  view source on GitHub ↗

render image using CUDA

Source from the content-addressed store, hash-verified

121
122// render image using CUDA
123void render()
124{
125 // map PBO to get CUDA device pointer
126 checkCudaErrors(cudaGraphicsMapResources(1, &cuda_pbo_resource, 0));
127 size_t num_bytes;
128 checkCudaErrors(cudaGraphicsResourceGetMappedPointer((void **)&d_output, &num_bytes, cuda_pbo_resource));
129
130 // call CUDA kernel, writing results to PBO
131 renderAtlasImage(windowGridSize, windowBlockSize, d_output, windowSize.x, windowSize.y, lod);
132
133 getLastCudaError("render_kernel failed");
134
135 checkCudaErrors(cudaGraphicsUnmapResources(1, &cuda_pbo_resource, 0));
136}
137
138// display results using OpenGL (called by GLUT)
139void display()

Callers 1

displayFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected