diff options
Diffstat (limited to 'source/blender/draw')
5 files changed, 4 insertions, 72 deletions
diff --git a/source/blender/draw/engines/eevee/eevee_engine.c b/source/blender/draw/engines/eevee/eevee_engine.c index cc7d0c6b22e..f04405d7110 100644 --- a/source/blender/draw/engines/eevee/eevee_engine.c +++ b/source/blender/draw/engines/eevee/eevee_engine.c @@ -109,7 +109,7 @@ void EEVEE_cache_populate(void *vedata, Object *ob) } if (DRW_object_is_renderable(ob) && (ob_visibility & OB_VISIBLE_SELF)) { - if (ELEM(ob->type, OB_MESH, OB_SURF)) { + if (ob->type == OB_MESH) { EEVEE_materials_cache_populate(vedata, sldata, ob, &cast_shadow); } else if (ob->type == OB_CURVES) { diff --git a/source/blender/draw/engines/eevee/eevee_render.c b/source/blender/draw/engines/eevee/eevee_render.c index 3e268758076..c3b909f5fb9 100644 --- a/source/blender/draw/engines/eevee/eevee_render.c +++ b/source/blender/draw/engines/eevee/eevee_render.c @@ -224,7 +224,7 @@ void EEVEE_render_cache(void *vedata, } if (ob_visibility & OB_VISIBLE_SELF) { - if (ELEM(ob->type, OB_MESH, OB_SURF)) { + if (ob->type == OB_MESH) { EEVEE_materials_cache_populate(vedata, sldata, ob, &cast_shadow); if (do_cryptomatte) { EEVEE_cryptomatte_cache_populate(data, sldata, ob); diff --git a/source/blender/draw/engines/eevee_next/eevee_instance.cc b/source/blender/draw/engines/eevee_next/eevee_instance.cc index eb32ebe9555..d28eb55c3b1 100644 --- a/source/blender/draw/engines/eevee_next/eevee_instance.cc +++ b/source/blender/draw/engines/eevee_next/eevee_instance.cc @@ -142,12 +142,8 @@ void Instance::object_sync(Object *ob) lights.sync_light(ob, ob_handle); break; case OB_MESH: - case OB_CURVES_LEGACY: - case OB_SURF: - case OB_FONT: { sync.sync_mesh(ob, ob_handle); break; - } case OB_VOLUME: break; case OB_CURVES: diff --git a/source/blender/draw/engines/workbench/workbench_engine.c b/source/blender/draw/engines/workbench/workbench_engine.c index ad32618e636..a0459a967f3 100644 --- a/source/blender/draw/engines/workbench/workbench_engine.c +++ b/source/blender/draw/engines/workbench/workbench_engine.c @@ -409,7 +409,7 @@ void workbench_cache_populate(void *ved, Object *ob) return; } - if (ELEM(ob->type, OB_MESH, OB_SURF, OB_POINTCLOUD)) { + if (ELEM(ob->type, OB_MESH, OB_POINTCLOUD)) { bool use_sculpt_pbvh, use_texpaint_mode, draw_shadow, has_transp_mat = false; eV3DShadingColorType color_type = workbench_color_type_get( wpd, ob, &use_sculpt_pbvh, &use_texpaint_mode, &draw_shadow); diff --git a/source/blender/draw/intern/draw_cache.c b/source/blender/draw/intern/draw_cache.c index 275392ec56a..4ff5745fc86 100644 --- a/source/blender/draw/intern/draw_cache.c +++ b/source/blender/draw/intern/draw_cache.c @@ -851,7 +851,6 @@ GPUBatch *DRW_cache_object_all_edges_get(Object *ob) switch (ob->type) { case OB_MESH: return DRW_cache_mesh_all_edges_get(ob); - /* TODO: should match #DRW_cache_object_surface_get. */ default: return NULL; @@ -863,18 +862,6 @@ GPUBatch *DRW_cache_object_edge_detection_get(Object *ob, bool *r_is_manifold) switch (ob->type) { case OB_MESH: return DRW_cache_mesh_edge_detection_get(ob, r_is_manifold); - case OB_CURVES_LEGACY: - return NULL; - case OB_SURF: - return NULL; - case OB_FONT: - return NULL; - case OB_CURVES: - return NULL; - case OB_POINTCLOUD: - return NULL; - case OB_VOLUME: - return NULL; default: return NULL; } @@ -885,21 +872,12 @@ GPUBatch *DRW_cache_object_face_wireframe_get(Object *ob) switch (ob->type) { case OB_MESH: return DRW_cache_mesh_face_wireframe_get(ob); - case OB_CURVES_LEGACY: - return NULL; - case OB_SURF: - return NULL; - case OB_FONT: - return NULL; - case OB_CURVES: - return NULL; case OB_POINTCLOUD: return DRW_pointcloud_batch_cache_get_dots(ob); case OB_VOLUME: return DRW_cache_volume_face_wireframe_get(ob); - case OB_GPENCIL: { + case OB_GPENCIL: return DRW_cache_gpencil_face_wireframe_get(ob); - } default: return NULL; } @@ -910,18 +888,6 @@ GPUBatch *DRW_cache_object_loose_edges_get(struct Object *ob) switch (ob->type) { case OB_MESH: return DRW_cache_mesh_loose_edges_get(ob); - case OB_CURVES_LEGACY: - return NULL; - case OB_SURF: - return NULL; - case OB_FONT: - return NULL; - case OB_CURVES: - return NULL; - case OB_POINTCLOUD: - return NULL; - case OB_VOLUME: - return NULL; default: return NULL; } @@ -932,18 +898,8 @@ GPUBatch *DRW_cache_object_surface_get(Object *ob) switch (ob->type) { case OB_MESH: return DRW_cache_mesh_surface_get(ob); - case OB_CURVES_LEGACY: - return NULL; - case OB_SURF: - return NULL; - case OB_FONT: - return NULL; - case OB_CURVES: - return NULL; case OB_POINTCLOUD: return DRW_cache_pointcloud_surface_get(ob); - case OB_VOLUME: - return NULL; default: return NULL; } @@ -957,16 +913,6 @@ GPUVertBuf *DRW_cache_object_pos_vertbuf_get(Object *ob) switch (type) { case OB_MESH: return DRW_mesh_batch_cache_pos_vertbuf_get((me != NULL) ? me : ob->data); - case OB_CURVES_LEGACY: - case OB_SURF: - case OB_FONT: - return NULL; - case OB_CURVES: - return NULL; - case OB_POINTCLOUD: - return NULL; - case OB_VOLUME: - return NULL; default: return NULL; } @@ -1012,18 +958,8 @@ GPUBatch **DRW_cache_object_surface_material_get(struct Object *ob, switch (ob->type) { case OB_MESH: return DRW_cache_mesh_surface_shaded_get(ob, gpumat_array, gpumat_array_len); - case OB_CURVES_LEGACY: - return NULL; - case OB_SURF: - return NULL; - case OB_FONT: - return NULL; - case OB_CURVES: - return NULL; case OB_POINTCLOUD: return DRW_cache_pointcloud_surface_shaded_get(ob, gpumat_array, gpumat_array_len); - case OB_VOLUME: - return NULL; default: return NULL; } |