Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- float *devPtr; //this is device pointer that holds an array of floats
- //6 floats represent a vertex, array size is vertsCount*6*sizeof(float).
- //format is [v0x, v0y, v0z, n0x, n0y, n0z, v1x, v1y, v1z, n1x, ...]
- typedef thrust::tuple<float, float, float, float, float, float> MCVertex;
- thrust::device_vector<MCVertex> inputVertices(vertsCount);
- //copy from *devPtr to inputVertices.
- //use something like unique to get rid of redundancies.
- thrust::unique(inputVertices.begin(), inputVertices.end());
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement