Jump to content
  • Advertisement
Sign in to follow this  
GildeD

glPointSize not working?!

This topic is 5068 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'm writing a simple polygon editor program for my class and I need to make the points on the polygons bigger than the lines so you can see them to grab them. So the idea was to draw the polygon first and then go back and draw points at it vertices big enough to see clearly. I was told that glPointSize was the way to make the points bigger but it doesn't seem to work. I've tried man different numbers and it always draws the points only one pixel big any idea why? It's working I just can't seem to get the points any bigger than one pixel. I checked GL_POINT_SIZE_RANGE and it returned 1 to around 63 and I'm just going for like 5 here.
    glBegin(GL_POINTS);
        glPointSize(10.0);
        glColor3f(0.0, 0.0, 1.0);
        for (i = 0; i < numVerts; i++) {
            glVertex3f(verts.x,verts.y,verts.z);
        }
    glEnd();

Share this post


Link to post
Share on other sites
Advertisement
glPointSize needs to be outside of the glBegin/glEnd pair.
Also, for better looking points, you may want to enable GL_POINT_SMOOTH and set the GL_POINT_SMOOTH_HINT to GL_NICEST.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!