Sign in to follow this  

GL_POINTS Slow

This topic is 4202 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I was wondering... and this might be impossible... if there was a faster way to display a point cloud rather than GL_POINTS. My target is to show about 100,000 points and be as fast as possible. Let me know if there is a better technique than glbegin(GL_POINTS) 100,000 x glColor3f(r, g, b); glVertex3d(x, y, z); glEnd() in terms of speed

Share this post


Link to post
Share on other sites
Put your point positions and colors in arrays using glVertexPointer() and glColorPointer(), and then call glDrawArrays(GL_POINTS, ...) instead. This will be much faster than using 100,000 glColor() and glVertex() calls. If you want even more speed, look into using vertex buffer objects (VBOs).

Share this post


Link to post
Share on other sites
Quote:
Original post by Eric Lengyel
Put your point positions and colors in arrays using glVertexPointer() and glColorPointer(), and then call glDrawArrays(GL_POINTS, ...) instead. This will be much faster than using 100,000 glColor() and glVertex() calls. If you want even more speed, look into using vertex buffer objects (VBOs).


Thats exactly what I was looking for... thanks.

Share this post


Link to post
Share on other sites

This topic is 4202 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this