PeriDyno 1.0.0
Loading...
Searching...
No Matches
RenderTools.cu
Go to the documentation of this file.
1#include "RenderTools.h"
2
3namespace dyno {
4
5 __global__ void RT_SetupColor(DArray<Vec3f> colorArray, Vec3f color)
6 {
7 int pId = threadIdx.x + (blockIdx.x * blockDim.x);
8 if (pId >= colorArray.size()) return;
9
10 colorArray[pId] = color;
11 }
12
13 void RenderTools::setupColor(DArray<Vec3f>& colorArray, const Vec3f& color)
14 {
15 cuExecute(colorArray.size(),
16 RT_SetupColor,
17 colorArray,
18 color);
19 }
20}