Archived

This topic is now archived and is closed to further replies.

GL_POINTS. slow rendering

This topic is 5094 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

Hello all I have a bit of a problem my app renders lots of GL_POINTS using glBegin(GL_POINTS) while(counter < loads) { glVertex3f(array[0][counter],array[1][counter],array[2][counter]); counter++; } glEnd(); but i need to use picking so i have to use the code below but it makes everything REALLY sloooow is there a quicker way of doing this ? while(counter < loads) { glPushName(0); //etc etc glBegin(GL_POINTS) glVertex3f(array[0][counter],array[1][counter],array[2][counter]); glEnd(); //etc etc counter++; }

Share this post


Link to post
Share on other sites
If all you are testing is points, you can do without picking.

Use gluProject to convert your point to screen coordiantes, then just test the mouse for being over the point with a 2D ''point in box'' test.

Share this post


Link to post
Share on other sites

>>Use gluProject to convert your point to screen coordiantes,
yes, but using this method could be inaccurate; because the points could be bigger than one pixel.

DJSnow
---
this post is manually created and therefore legally valid without a signature

Share this post


Link to post
Share on other sites