diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-05-04 16:00:11 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-05-04 16:00:11 +0400 |
commit | b9076b87d28a741e09bd7da66bf9d1a1fe07c38d (patch) | |
tree | b29486893b7f4b844355c2cd82a2fd8f10dbb7fa /source/blender/editors/gpencil/drawgpencil.c | |
parent | 5a0dca41e5aed566ce6427c863c2f3072f7d044c (diff) |
pass colors to glColor as vectors where possible.
Diffstat (limited to 'source/blender/editors/gpencil/drawgpencil.c')
-rw-r--r-- | source/blender/editors/gpencil/drawgpencil.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/editors/gpencil/drawgpencil.c b/source/blender/editors/gpencil/drawgpencil.c index 1a9ef4be70f..b93e4b07302 100644 --- a/source/blender/editors/gpencil/drawgpencil.c +++ b/source/blender/editors/gpencil/drawgpencil.c @@ -486,7 +486,7 @@ static void gp_draw_strokes (bGPDframe *gpf, int offsx, int offsy, int winx, int bGPDstroke *gps; /* set color first (may need to reset it again later too) */ - glColor4f(color[0], color[1], color[2], color[3]); + glColor4fv(color); for (gps= gpf->strokes.first; gps; gps= gps->next) { /* check if stroke can be drawn - checks here generally fall into pairs */ @@ -579,7 +579,7 @@ static void gp_draw_data (bGPdata *gpd, int offsx, int offsy, int winx, int winy glLineWidth(lthick); QUATCOPY(color, gpl->color); // just for copying 4 array elements QUATCOPY(tcolor, gpl->color); // additional copy of color (for ghosting) - glColor4f(color[0], color[1], color[2], color[3]); + glColor4fv(color); glPointSize((float)(gpl->thickness + 2)); /* apply xray layer setting */ @@ -620,7 +620,7 @@ static void gp_draw_data (bGPdata *gpd, int offsx, int offsy, int winx, int winy } /* restore alpha */ - glColor4f(color[0], color[1], color[2], color[3]); + glColor4fv(color); } else { /* draw the strokes for the ghost frames (at half of the alpha set by user) */ @@ -635,7 +635,7 @@ static void gp_draw_data (bGPdata *gpd, int offsx, int offsy, int winx, int winy } /* restore alpha */ - glColor4f(color[0], color[1], color[2], color[3]); + glColor4fv(color); } } |