[Bf-blender-cvs] [36f5dff] temp_viewport_fx_merge: Merge branch 'master' into temp_viewport_fx_merge
Antony Riakiotakis
noreply at git.blender.org
Mon Apr 20 11:04:57 CEST 2015
Commit: 36f5dffc6a712d634d3ce1cbf7a5ad9509668bcd
Author: Antony Riakiotakis
Date: Mon Apr 20 11:01:12 2015 +0200
Branches: temp_viewport_fx_merge
https://developer.blender.org/rB36f5dffc6a712d634d3ce1cbf7a5ad9509668bcd
Merge branch 'master' into temp_viewport_fx_merge
Conflicts:
source/blender/editors/gpencil/drawgpencil.c
===================================================================
===================================================================
diff --cc source/blender/editors/gpencil/drawgpencil.c
index cf4b776,0892692..3145c07
--- a/source/blender/editors/gpencil/drawgpencil.c
+++ b/source/blender/editors/gpencil/drawgpencil.c
@@@ -124,8 -121,8 +124,8 @@@ static void gp_draw_stroke_buffer(tGPsp
/* draw stroke curve */
if (G.debug & G_DEBUG) setlinestyle(2);
- glLineWidth(oldpressure * thickness);
+ glLineWidth(max_ff(oldpressure * thickness, 1.0));
- glBegin(GL_LINE_STRIP);
+ GPUBegin(GL_LINE_STRIP);
for (i = 0, pt = points; i < totpoints && pt; i++, pt++) {
/* if there was a significant pressure change, stop the curve, change the thickness of the stroke,
@@@ -133,8 -130,8 +133,8 @@@
*/
if (fabsf(pt->pressure - oldpressure) > 0.2f) {
glEnd();
- glLineWidth(pt->pressure * thickness);
+ glLineWidth(max_ff(pt->pressure * thickness, 1.0f));
- glBegin(GL_LINE_STRIP);
+ GPUBegin(GL_LINE_STRIP);
/* need to roll-back one point to ensure that there are no gaps in the stroke */
if (i != 0) glVertex2iv(&(pt - 1)->x);
@@@ -405,8 -415,8 +405,8 @@@ static void gp_draw_stroke_3d(bGPDspoin
int i;
/* draw stroke curve */
- glLineWidth(curpressure * thickness);
+ glLineWidth(max_ff(curpressure * thickness, 1.0f));
- glBegin(GL_LINE_STRIP);
+ GPUBegin(GL_LINE_STRIP);
for (i = 0, pt = points; i < totpoints && pt; i++, pt++) {
/* if there was a significant pressure change, stop the curve, change the thickness of the stroke,
* and continue drawing again (since line-width cannot change in middle of GL_LINE_STRIP)
@@@ -415,8 -425,8 +415,8 @@@
if (fabsf(pt->pressure - curpressure) > 0.2f / (float)thickness) {
glEnd();
curpressure = pt->pressure;
- glLineWidth(curpressure * thickness);
+ glLineWidth(max_ff(curpressure * thickness, 1.0f));
- glBegin(GL_LINE_STRIP);
+ GPUBegin(GL_LINE_STRIP);
/* need to roll-back one point to ensure that there are no gaps in the stroke */
if (i != 0) glVertex3fv(&(pt - 1)->x);
More information about the Bf-blender-cvs
mailing list