diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-03-19 05:07:48 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-03-19 05:07:48 +0300 |
commit | d731ee4960cf78f7b461be0c8f5ef27c098da265 (patch) | |
tree | 256f40a54c1ffa35459f69d343b616ca9af7c695 /source/blender/windowmanager/intern | |
parent | d47f827019f2ac3e2b495fab887023660fdae031 (diff) |
Fix T61368: Brush texture preview ignores rotation
Diffstat (limited to 'source/blender/windowmanager/intern')
-rw-r--r-- | source/blender/windowmanager/intern/wm_operators.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c index ff3d1601dde..ac7d496ea35 100644 --- a/source/blender/windowmanager/intern/wm_operators.c +++ b/source/blender/windowmanager/intern/wm_operators.c @@ -2062,11 +2062,6 @@ static void radial_control_paint_tex(RadialControl *rc, float radius, float alph GLint swizzleMask[] = {GL_ZERO, GL_ZERO, GL_ZERO, GL_RED}; glTexParameteriv(GL_TEXTURE_2D, GL_TEXTURE_SWIZZLE_RGBA, swizzleMask); - immBindBuiltinProgram(GPU_SHADER_2D_IMAGE_MASK_UNIFORM_COLOR); - - immUniformColor3fvAlpha(col, alpha); - immUniform1i("image", 0); - /* set up rotation if available */ if (rc->rot_prop) { rot = RNA_property_float_get(&rc->rot_ptr, rc->rot_prop); @@ -2074,6 +2069,11 @@ static void radial_control_paint_tex(RadialControl *rc, float radius, float alph GPU_matrix_rotate_2d(RAD2DEGF(rot)); } + immBindBuiltinProgram(GPU_SHADER_2D_IMAGE_MASK_UNIFORM_COLOR); + + immUniformColor3fvAlpha(col, alpha); + immUniform1i("image", 0); + /* draw textured quad */ immBegin(GPU_PRIM_TRI_FAN, 4); |