Cleanup: Consistent naming GPU_SHADER_2D_AREA_BORDERS.

This commit is contained in:
Jeroen Bakker 2022-01-10 12:22:06 +01:00
parent 227fd753df
commit 3488339475
4 changed files with 6 additions and 6 deletions

View File

@ -144,7 +144,7 @@ static void drawscredge_area_draw(
}
GPUBatch *batch = batch_screen_edges_get(NULL);
GPU_batch_program_set_builtin(batch, GPU_SHADER_2D_AREA_EDGES);
GPU_batch_program_set_builtin(batch, GPU_SHADER_2D_AREA_BORDERS);
GPU_batch_uniform_4fv(batch, "rect", (float *)&rect);
GPU_batch_draw(batch);
}
@ -212,7 +212,7 @@ void ED_screen_draw_edges(wmWindow *win)
GPU_blend(GPU_BLEND_ALPHA);
GPUBatch *batch = batch_screen_edges_get(&verts_per_corner);
GPU_batch_program_set_builtin(batch, GPU_SHADER_2D_AREA_EDGES);
GPU_batch_program_set_builtin(batch, GPU_SHADER_2D_AREA_BORDERS);
GPU_batch_uniform_1i(batch, "cornerLen", verts_per_corner);
GPU_batch_uniform_1f(batch, "scale", corner_scale);
GPU_batch_uniform_4fv(batch, "color", col);

View File

@ -403,7 +403,7 @@ typedef enum eGPUBuiltinShader {
/* grease pencil drawing */
GPU_SHADER_GPENCIL_STROKE,
/* specialized for widget drawing */
GPU_SHADER_2D_AREA_EDGES,
GPU_SHADER_2D_AREA_BORDERS,
GPU_SHADER_2D_WIDGET_BASE,
GPU_SHADER_2D_WIDGET_BASE_INST,
GPU_SHADER_2D_WIDGET_SHADOW,

View File

@ -418,9 +418,9 @@ static const GPUShaderStages builtin_shader_stages[GPU_SHADER_BUILTIN_LEN] = {
.defs = "#define UNIFORM_SCALE\n",
},
[GPU_SHADER_2D_AREA_EDGES] =
[GPU_SHADER_2D_AREA_BORDERS] =
{
.name = "GPU_SHADER_2D_AREA_EDGES",
.name = "GPU_SHADER_2D_AREA_BORDERS",
.vert = datatoc_gpu_shader_2D_area_borders_vert_glsl,
.frag = datatoc_gpu_shader_2D_area_borders_frag_glsl,
},

View File

@ -73,7 +73,7 @@ static void test_shader_builtin()
GPU_SHADER_CFG_DEFAULT);
test_compile_builtin_shader(GPU_SHADER_2D_LINE_DASHED_UNIFORM_COLOR, GPU_SHADER_CFG_DEFAULT);
test_compile_builtin_shader(GPU_SHADER_GPENCIL_STROKE, GPU_SHADER_CFG_DEFAULT);
test_compile_builtin_shader(GPU_SHADER_2D_AREA_EDGES, GPU_SHADER_CFG_DEFAULT);
test_compile_builtin_shader(GPU_SHADER_2D_AREA_BORDERS, GPU_SHADER_CFG_DEFAULT);
test_compile_builtin_shader(GPU_SHADER_2D_WIDGET_BASE, GPU_SHADER_CFG_DEFAULT);
test_compile_builtin_shader(GPU_SHADER_2D_WIDGET_BASE_INST, GPU_SHADER_CFG_DEFAULT);
test_compile_builtin_shader(GPU_SHADER_2D_WIDGET_SHADOW, GPU_SHADER_CFG_DEFAULT);