PDA

View Full Version : Masking vertices



samvdj
12-10-2013, 09:19 AM
Dear all,

I am visualizing an (x,y,z) surface in 3D using a VBO:


float4* d_result;

cudaGraphicsMapResources(1, &positionsVBO_CUDA, 0);
size_t num_bytes;
cudaGraphicsResourceGetMappedPointer((void**)&d_result, &num_bytes, positionsVBO_CUDA);

where the float4 d_result holds the (x,y,z) data.

2 questions though:

1) How would I go about "filling" or "coloring in" the created vertices? Even with a uniform color I have no idea.

2) I have a binary mask which holds the (x,y) positions at which I would like to NOT display the z values. I can
set them to 0 or any other number of choice successfully, but would rather not display the corresponding
vertices at all. Should I use NaN's? Is this even possible?

Thanks in advance,

Sam

tonyo_au
12-13-2013, 01:48 AM
I suggest you start with this
http://www.opengl-tutorial.org/