[Bf-blender-cvs] [d438e71729d] master: GPencil: Use uniform_int_copy instead to pass reference

Antonioya noreply at git.blender.org
Mon Jul 29 12:11:31 CEST 2019


Commit: d438e71729d1e95edf58ee6b8e99def22adf813e
Author: Antonioya
Date:   Sat Jul 27 17:37:31 2019 +0200
Branches: master
https://developer.blender.org/rBd438e71729d1e95edf58ee6b8e99def22adf813e

GPencil: Use uniform_int_copy instead to pass reference

The constant variable was passed as reference to constant variable, but it's better use the new function to copy values.

This could be the problem with T67772

===================================================================

M	source/blender/draw/engines/gpencil/gpencil_shader_fx.c

===================================================================

diff --git a/source/blender/draw/engines/gpencil/gpencil_shader_fx.c b/source/blender/draw/engines/gpencil/gpencil_shader_fx.c
index 306444303e2..0f4043ce278 100644
--- a/source/blender/draw/engines/gpencil/gpencil_shader_fx.c
+++ b/source/blender/draw/engines/gpencil/gpencil_shader_fx.c
@@ -463,12 +463,11 @@ static void gpencil_fx_shadow(ShaderFxData *fx,
     DRW_shgroup_uniform_vec3(fx_shgrp, "loc", fxd->runtime.loc, 1);
   }
 
-  const int nowave = -1;
   if (fxd->flag & FX_SHADOW_USE_WAVE) {
     DRW_shgroup_uniform_int(fx_shgrp, "orientation", &fxd->orientation, 1);
   }
   else {
-    DRW_shgroup_uniform_int(fx_shgrp, "orientation", &nowave, 1);
+    DRW_shgroup_uniform_int_copy(fx_shgrp, "orientation", -1);
   }
   DRW_shgroup_uniform_float(fx_shgrp, "amplitude", &fxd->amplitude, 1);
   DRW_shgroup_uniform_float(fx_shgrp, "period", &fxd->period, 1);



More information about the Bf-blender-cvs mailing list