Sign in to follow this  

glPointSize not working?!

This topic is 4884 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[i].x,verts[i].y,verts[i].z);
        }
    glEnd();

Share this post


Link to post
Share on other sites
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

This topic is 4884 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this