Commit: 6b1e6b2061349be7e1704a59e1147a22977517e7
Author: Antonio Vazquez
Date:   Wed Jun 20 17:08:46 2018 +0200
Branches: greasepencil-object
https://developer.blender.org/rB6b1e6b2061349be7e1704a59e1147a22977517e7

Cleanup: Rename fields

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

M       source/blender/draw/engines/gpencil/gpencil_engine.c
M       source/blender/draw/engines/gpencil/gpencil_engine.h

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

diff --git a/source/blender/draw/engines/gpencil/gpencil_engine.c 
b/source/blender/draw/engines/gpencil/gpencil_engine.c
index 591b6999206..49c5767ebee 100644
--- a/source/blender/draw/engines/gpencil/gpencil_engine.c
+++ b/source/blender/draw/engines/gpencil/gpencil_engine.c
@@ -194,8 +194,8 @@ static void GPENCIL_create_shaders(void)
        }
 
        /* shaders for use when drawing */
-       if (!e_data.gpencil_painting_sh) {
-               e_data.gpencil_painting_sh = 
DRW_shader_create_fullscreen(datatoc_gpencil_painting_frag_glsl, NULL);
+       if (!e_data.gpencil_background_sh) {
+               e_data.gpencil_background_sh = 
DRW_shader_create_fullscreen(datatoc_gpencil_painting_frag_glsl, NULL);
        }
        if (!e_data.gpencil_paper_sh) {
                e_data.gpencil_paper_sh = 
DRW_shader_create_fullscreen(datatoc_gpencil_paper_frag_glsl, NULL);
@@ -237,7 +237,7 @@ static void GPENCIL_engine_free(void)
        DRW_SHADER_FREE_SAFE(e_data.gpencil_edit_point_sh);
        DRW_SHADER_FREE_SAFE(e_data.gpencil_fullscreen_sh);
        DRW_SHADER_FREE_SAFE(e_data.gpencil_simple_fullscreen_sh);
-       DRW_SHADER_FREE_SAFE(e_data.gpencil_painting_sh);
+       DRW_SHADER_FREE_SAFE(e_data.gpencil_background_sh);
        DRW_SHADER_FREE_SAFE(e_data.gpencil_paper_sh);
 
        DRW_TEXTURE_FREE_SAFE(e_data.gpencil_blank_texture);
@@ -392,11 +392,11 @@ void GPENCIL_cache_init(void *vedata)
                 * In this way, the previous strokes don't need to be redraw 
and the drawing process
                 * is far to agile.
                 */
-               psl->background_pass = DRW_pass_create("GPencil Painting 
Session Pass", DRW_STATE_WRITE_COLOR | DRW_STATE_BLEND | DRW_STATE_WRITE_DEPTH 
| DRW_STATE_DEPTH_LESS);
-               DRWShadingGroup *painting_shgrp = 
DRW_shgroup_create(e_data.gpencil_painting_sh, psl->background_pass);
-               DRW_shgroup_call_add(painting_shgrp, quad, NULL);
-               DRW_shgroup_uniform_texture_ref(painting_shgrp, "strokeColor", 
&e_data.background_color_tx);
-               DRW_shgroup_uniform_texture_ref(painting_shgrp, "strokeDepth", 
&e_data.background_depth_tx);
+               psl->background_pass = DRW_pass_create("GPencil Background 
Painting Session Pass", DRW_STATE_WRITE_COLOR | DRW_STATE_BLEND | 
DRW_STATE_WRITE_DEPTH | DRW_STATE_DEPTH_LESS);
+               DRWShadingGroup *background_shgrp = 
DRW_shgroup_create(e_data.gpencil_background_sh, psl->background_pass);
+               DRW_shgroup_call_add(background_shgrp, quad, NULL);
+               DRW_shgroup_uniform_texture_ref(background_shgrp, 
"strokeColor", &e_data.background_color_tx);
+               DRW_shgroup_uniform_texture_ref(background_shgrp, 
"strokeDepth", &e_data.background_depth_tx);
 
                /* pass for drawing paper (only if viewport)
                 * In render, the v3d is null
diff --git a/source/blender/draw/engines/gpencil/gpencil_engine.h 
b/source/blender/draw/engines/gpencil/gpencil_engine.h
index 5d033a824a6..0bce4e663cd 100644
--- a/source/blender/draw/engines/gpencil/gpencil_engine.h
+++ b/source/blender/draw/engines/gpencil/gpencil_engine.h
@@ -200,7 +200,7 @@ typedef struct GPENCIL_e_data {
        struct GPUShader *gpencil_drawing_fill_sh;
        struct GPUShader *gpencil_fullscreen_sh;
        struct GPUShader *gpencil_simple_fullscreen_sh;
-       struct GPUShader *gpencil_painting_sh;
+       struct GPUShader *gpencil_background_sh;
        struct GPUShader *gpencil_paper_sh;
 
        /* textures */

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to