thinks
12-15-2006, 01:27 AM
I have a large point cloud (~6-7 million points) that comes with a normal and a color for each point.
At the moment I am using a VBO and simply associating a color with each point. I would like to use the normals ti do some lighting calculations but AFAIK there is no equivalent of the glColorPointer(...) for materials, or is there?
I suppose the obvious solution would be to write a vertex shader.
I was just wondering if there is a simpler way.
My second question is regarding efficiency. I hear that the graphics hardware stores colors as floats no matter what format they are passed as. I am currently passing the colors as GLubyte, is this inefficient?
Any other advice regarding rendering large point clouds are obviously welcome as well! :)
Thanks,
--thinks
At the moment I am using a VBO and simply associating a color with each point. I would like to use the normals ti do some lighting calculations but AFAIK there is no equivalent of the glColorPointer(...) for materials, or is there?
I suppose the obvious solution would be to write a vertex shader.
I was just wondering if there is a simpler way.
My second question is regarding efficiency. I hear that the graphics hardware stores colors as floats no matter what format they are passed as. I am currently passing the colors as GLubyte, is this inefficient?
Any other advice regarding rendering large point clouds are obviously welcome as well! :)
Thanks,
--thinks