Archived

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

moogle33

GL_POINTS. slow rendering

Recommended Posts

moogle33    122
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
rotos    122
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
DJSnow    100

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