Advertisement
Guest User

Untitled

a guest
Jul 1st, 2015
196
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. float *devPtr; //this is device pointer that holds an array of floats
  2. //6 floats represent a vertex, array size is vertsCount*6*sizeof(float).
  3. //format is [v0x, v0y, v0z, n0x, n0y, n0z, v1x, v1y, v1z, n1x, ...]
  4.  
  5. typedef thrust::tuple<float, float, float, float, float, float> MCVertex;
  6.  
  7. thrust::device_vector<MCVertex> inputVertices(vertsCount);
  8.  
  9. //copy from *devPtr to inputVertices.
  10.  
  11. //use something like unique to get rid of redundancies.
  12. thrust::unique(inputVertices.begin(), inputVertices.end());
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement