How to make polygon smoothing work?

I use these function calls:

glEnable(GL_BLEND)
glEnable(GL_POLYGON_SMOOTH)
glBlendFunc(GL_SRC_ALPHA_SATURATE, GL_ONE) 

It does not work and will not be displayed.

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

It is not an anti-alias.

+3
source share
2 answers

Try glHint(GL_POLYGON_SMOOTH_HINT, GL_NICEST)

+7
source

This is a mundane answer .. but if you want rounded corners, you probably want to use more vertices at the corners and place them for a more rounded shape. You can also study this procedurally .. but if you are making a game and want to finish it, I would usually recommend that you have the final position of the vertices in the data (if you have no good reason it is dynamic).

. , , .

+3

Source: https://habr.com/ru/post/1727783/


All Articles