Why not "glEnable (GL_POINT_SMOOTH)"; work to make the next paragraph like a circle?

I am trying to execute code (in c using opengl) a piece of a board game using GL_POINT for each piece. I have the following code:

        glEnable(GL_POINT_SMOOTH);
        glHint(GL_POINT_SMOOTH_HINT, GL_NICEST);
        glPointSize(20.0f);
        glBegin(GL_POINTS);

        glVertex2d(200, 200);

        glEnd();

Bur, for some reason, a dot always shows as a square, not a circle ... Does anyone know why?

+5
source share
2 answers

In fact, to smooth things out, you probably just need to turn on blending. Try adding:

glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);

I know that this is necessary to smooth the lines, and I am sure that this is the same for the dots.

Cheers, Matt

+6
source

All Articles