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

glPointSize not working?!

Started by GildeD Sep 2, 2004 at 10:48 PM 2 replies 5.3k views
Original Post
GildeD
GildeD
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();
.-= GildeD =-.
topher
topher
Place glPointSize() outside of glBegin()/glEnd().
Melekor
Melekor
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.
GildeD
GildeD
Thanks Everyone for the quick replies!
.-= GildeD =-.

Topic Locked

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

Sign in to reply to this topic.