Masking vertices

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

I suggest you start with this