diff options
Diffstat (limited to 'source/blender/draw/engines/workbench/workbench_forward.c')
-rw-r--r-- | source/blender/draw/engines/workbench/workbench_forward.c | 33 |
1 files changed, 20 insertions, 13 deletions
diff --git a/source/blender/draw/engines/workbench/workbench_forward.c b/source/blender/draw/engines/workbench/workbench_forward.c index f2cc7cdf573..7e09016cf61 100644 --- a/source/blender/draw/engines/workbench/workbench_forward.c +++ b/source/blender/draw/engines/workbench/workbench_forward.c @@ -134,13 +134,14 @@ static char *workbench_build_forward_composite_frag(void) return str; } -WORKBENCH_MaterialData *workbench_forward_get_or_create_material_data(WORKBENCH_Data *vedata, - Object *ob, - Material *mat, - Image *ima, - ImageUser *iuser, - int color_type, - int interp) +WORKBENCH_MaterialData *workbench_forward_get_or_create_material_data( + WORKBENCH_Data *vedata, + Object *ob, + Material *mat, + Image *ima, + ImageUser *iuser, + eV3DShadingColorType color_type, + int interp) { const DRWContextState *draw_ctx = DRW_context_state_get(); WORKBENCH_FORWARD_Shaders *sh_data = &e_data.sh_data[draw_ctx->sh_cfg]; @@ -487,7 +488,8 @@ static void workbench_forward_cache_populate_particles(WORKBENCH_Data *vedata, O ImageUser *iuser; int interp; workbench_material_get_image_and_mat(ob, part->omat, &image, &iuser, &interp, &mat); - int color_type = workbench_material_determine_color_type(wpd, image, ob, false); + eV3DShadingColorType color_type = workbench_material_determine_color_type( + wpd, image, ob, false); WORKBENCH_MaterialData *material = workbench_forward_get_or_create_material_data( vedata, ob, mat, image, iuser, color_type, interp); @@ -543,7 +545,8 @@ static void workbench_forward_cache_populate_texture_paint_mode(WORKBENCH_Data * Image *image = imapaint->canvas; int interp = (imapaint->interp == IMAGEPAINT_INTERP_LINEAR) ? SHD_INTERP_LINEAR : SHD_INTERP_CLOSEST; - int color_type = workbench_material_determine_color_type(wpd, image, ob, use_sculpt_pbvh); + eV3DShadingColorType color_type = workbench_material_determine_color_type( + wpd, image, ob, use_sculpt_pbvh); struct GPUBatch *geom = DRW_cache_mesh_surface_texpaint_single_get(ob); material = workbench_forward_get_or_create_material_data( vedata, ob, NULL, image, NULL, color_type, interp); @@ -562,7 +565,8 @@ static void workbench_forward_cache_populate_texture_paint_mode(WORKBENCH_Data * ImageUser *iuser; int interp; workbench_material_get_image_and_mat(ob, i + 1, &image, &iuser, &interp, &mat); - int color_type = workbench_material_determine_color_type(wpd, image, ob, use_sculpt_pbvh); + eV3DShadingColorType color_type = workbench_material_determine_color_type( + wpd, image, ob, use_sculpt_pbvh); material = workbench_forward_get_or_create_material_data( vedata, ob, mat, image, iuser, color_type, interp); @@ -582,7 +586,8 @@ static void workbench_forward_cache_populate_vertex_paint_mode(WORKBENCH_Data *v !DRW_state_is_image_render(); WORKBENCH_MaterialData *material; - int color_type = workbench_material_determine_color_type(wpd, NULL, ob, use_sculpt_pbvh); + eV3DShadingColorType color_type = workbench_material_determine_color_type( + wpd, NULL, ob, use_sculpt_pbvh); struct GPUBatch *geom = DRW_cache_mesh_surface_vertpaint_get(ob); material = workbench_forward_get_or_create_material_data( vedata, ob, NULL, NULL, NULL, color_type, false); @@ -653,7 +658,8 @@ void workbench_forward_cache_populate(WORKBENCH_Data *vedata, Object *ob) ImageUser *iuser; int interp; workbench_material_get_image_and_mat(ob, i + 1, &image, &iuser, &interp, &mat); - int color_type = workbench_material_determine_color_type(wpd, image, ob, use_sculpt_pbvh); + eV3DShadingColorType color_type = workbench_material_determine_color_type( + wpd, image, ob, use_sculpt_pbvh); material = workbench_forward_get_or_create_material_data( vedata, ob, mat, image, iuser, color_type, interp); DRW_shgroup_call(material->shgrp_object_outline, geom_array[i], ob); @@ -666,7 +672,8 @@ void workbench_forward_cache_populate(WORKBENCH_Data *vedata, Object *ob) V3D_SHADING_RANDOM_COLOR, V3D_SHADING_VERTEX_COLOR)) { /* No material split needed */ - int color_type = workbench_material_determine_color_type(wpd, NULL, ob, use_sculpt_pbvh); + eV3DShadingColorType color_type = workbench_material_determine_color_type( + wpd, NULL, ob, use_sculpt_pbvh); if (use_sculpt_pbvh) { material = workbench_forward_get_or_create_material_data( |