Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 2 of 2

Thread: Masking vertices

  1. #1
    Junior Member Newbie
    Join Date
    Jun 2013
    Posts
    23

    Masking vertices

    Dear all,

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

    Code :
    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

  2. #2
    Senior Member OpenGL Pro
    Join Date
    Jan 2012
    Location
    Australia
    Posts
    1,106
    I suggest you start with this
    http://www.opengl-tutorial.org/

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •