Advertisement

GL_POINTS. slow rendering

Started by January 05, 2004 03:25 PM
2 comments, last by moogle33 21 years, 2 months ago
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++; }
Try using a vertex array instead. You would just have to pass a pointer to the vertex with 1 call instead of multiple vertex calls.
*News tagenigma.com is my new domain.
Advertisement
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.

>>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
DJSnow---this post is manually created and therefore legally valid without a signature

This topic is closed to new replies.

Advertisement