diff options
author | Joshua Leung <aligorith@gmail.com> | 2014-12-02 02:51:55 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2014-12-02 02:51:55 +0300 |
commit | 8b6759a4a99eb76a489f72d749b594410ff2654e (patch) | |
tree | 0ecbe297d7dfc5deb82672d0bad282c6c9a844e7 /source/blender/editors/gpencil | |
parent | 0efa41e996aaf1f489e6f8f5395de04d98664834 (diff) |
GPencil Drawing: Enable polygon smoothing
This helps to reduce jaggies from thin lines, while also resulting in nicer
lines elsewhere.
I'm not sure if it's just me, but it seems to render slightly differently to
before for 3d strokes too (i.e. they seem a bit softer). Hopefully the
difference isn't big enough to affect/degrade the art style of any projects.
Diffstat (limited to 'source/blender/editors/gpencil')
-rw-r--r-- | source/blender/editors/gpencil/drawgpencil.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/editors/gpencil/drawgpencil.c b/source/blender/editors/gpencil/drawgpencil.c index 2584f578250..245f22cad1c 100644 --- a/source/blender/editors/gpencil/drawgpencil.c +++ b/source/blender/editors/gpencil/drawgpencil.c @@ -957,6 +957,9 @@ static void gp_draw_data(bGPdata *gpd, int offsx, int offsy, int winx, int winy, /* turn on smooth lines (i.e. anti-aliasing) */ glEnable(GL_LINE_SMOOTH); + glEnable(GL_POLYGON_SMOOTH); + glHint(GL_POLYGON_SMOOTH_HINT, GL_NICEST); + /* turn on alpha-blending */ glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glEnable(GL_BLEND); @@ -1055,6 +1058,7 @@ static void gp_draw_data(bGPdata *gpd, int offsx, int offsy, int winx, int winy, /* turn off alpha blending, then smooth lines */ glDisable(GL_BLEND); // alpha blending glDisable(GL_LINE_SMOOTH); // smooth lines + glDisable(GL_POLYGON_SMOOTH); // smooth poly lines /* restore initial gl conditions */ glLineWidth(1.0); |