diff --git a/applications/reconstruct/include/ftl/ray_cast_util.hpp b/applications/reconstruct/include/ftl/ray_cast_util.hpp index e35275279d81a36222c7f4178bb08b17153a9468..7ec68ffa4bcd01646f1b290f2b14ce8d612bddd4 100644 --- a/applications/reconstruct/include/ftl/ray_cast_util.hpp +++ b/applications/reconstruct/include/ftl/ray_cast_util.hpp @@ -59,10 +59,10 @@ struct RayCastData { updateConstantRayCastParams(params); } - __host__ void download(float3 *points, uchar3 *colours, const RayCastParams& params) const { + __host__ void download(int *depth, uchar3 *colours, const RayCastParams& params) const { //printf("Download: %d,%d\n", params.m_width, params.m_height); - //cudaSafeCall(cudaMemcpy(points, d_depth3, sizeof(float3) * params.m_width * params.m_height, cudaMemcpyDeviceToHost)); - cudaSafeCall(cudaMemcpy(colours, d_colors, sizeof(uchar3) * params.m_width * params.m_height, cudaMemcpyDeviceToHost)); + if (depth) cudaSafeCall(cudaMemcpy(depth, d_depth_i, sizeof(int) * params.m_width * params.m_height, cudaMemcpyDeviceToHost)); + if (colours) cudaSafeCall(cudaMemcpy(colours, d_colors, sizeof(uchar3) * params.m_width * params.m_height, cudaMemcpyDeviceToHost)); } __host__