Skip to main content
GameDev.net gamedev.net
🔒 Locked

GL_POINTS. slow rendering

Started by moogle33 Jan 5, 2004 at 3:25 PM 2 replies 1.2k views
Original Post
moogle33
moogle33
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++; }
tgraupmann
tgraupmann
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.
rotos
rotos
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.
DJSnow
DJSnow

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

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.