GPencil: Another fix for the "big square dots" problem
Strokes containing only a single point are now drawn so that they respect the pressure values too. Previously, they were getting drawn at a fixed size based on the thickness of strokes. Thanks to @kekeljevic for posting a screenshot which made the problem here easy to identify! (On a side note: Perhaps it's a combination of the drivers I'm using, or the multisampling goodness at work, but after applying this change, the dots are now appearing as round circles as originally intended, and can also be scaled up quite a bit too. And that's for 3D points which couldn't be affected like this earlier! I'm not sure what's going on here, but whatever it is, I like it ;)
This commit is contained in:
parent
6ec05eb3e6
commit
813dcb9feb
|
@ -363,6 +363,9 @@ static void gp_draw_stroke_fill(bGPDspoint *points, int totpoints, short UNUSED(
|
|||
static void gp_draw_stroke_point(bGPDspoint *points, short thickness, short dflag, short sflag,
|
||||
int offsx, int offsy, int winx, int winy)
|
||||
{
|
||||
/* set point thickness (since there's only one of these) */
|
||||
glPointSize((float)(thickness + 2) * points->pressure);
|
||||
|
||||
/* draw point */
|
||||
if (sflag & GP_STROKE_3DSPACE) {
|
||||
glBegin(GL_POINTS);
|
||||
|
@ -966,9 +969,8 @@ static void gp_draw_data_layers(bGPdata *gpd, int offsx, int offsy, int winx, in
|
|||
if (gpf == NULL)
|
||||
continue;
|
||||
|
||||
/* set color, stroke thickness, and point size */
|
||||
/* set basic stroke thickness */
|
||||
glLineWidth(lthick);
|
||||
glPointSize((float)(gpl->thickness + 2));
|
||||
|
||||
/* Add layer drawing settings to the set of "draw flags"
|
||||
* NOTE: If the setting doesn't apply, it *must* be cleared,
|
||||
|
|
Loading…
Reference in New Issue