Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/intern/draw_cache.c
| Show First 20 Lines • Show All 2,883 Lines • ▼ Show 20 Lines | |||||
| } | } | ||||
| GPUBatch *DRW_cache_mesh_surface_mesh_analysis_get(Object *ob) | GPUBatch *DRW_cache_mesh_surface_mesh_analysis_get(Object *ob) | ||||
| { | { | ||||
| BLI_assert(ob->type == OB_MESH); | BLI_assert(ob->type == OB_MESH); | ||||
| return DRW_mesh_batch_cache_get_edit_mesh_analysis(ob->data); | return DRW_mesh_batch_cache_get_edit_mesh_analysis(ob->data); | ||||
| } | } | ||||
| GPUBatch *DRW_cache_mesh_surface_viewer_attribute_get(Object *ob) | |||||
| { | |||||
| BLI_assert(ob->type == OB_MESH); | |||||
| return DRW_mesh_batch_cache_get_surface_viewer_attribute(ob->data); | |||||
| } | |||||
| /** \} */ | /** \} */ | ||||
| /* -------------------------------------------------------------------- */ | /* -------------------------------------------------------------------- */ | ||||
| /** \name Curve | /** \name Curve | ||||
| * \{ */ | * \{ */ | ||||
| GPUBatch *DRW_cache_curve_edge_wire_get(Object *ob) | GPUBatch *DRW_cache_curve_edge_wire_get(Object *ob) | ||||
| { | { | ||||
| BLI_assert(ob->type == OB_CURVES_LEGACY); | BLI_assert(ob->type == OB_CURVES_LEGACY); | ||||
| struct Curve *cu = ob->data; | struct Curve *cu = ob->data; | ||||
| return DRW_curve_batch_cache_get_wire_edge(cu); | return DRW_curve_batch_cache_get_wire_edge(cu); | ||||
| } | } | ||||
| GPUBatch *DRW_cache_curve_edge_wire_viewer_attribute_get(Object *ob) | |||||
| { | |||||
| BLI_assert(ob->type == OB_CURVES_LEGACY); | |||||
| struct Curve *cu = ob->data; | |||||
| return DRW_curve_batch_cache_get_wire_edge_viewer_attribute(cu); | |||||
| } | |||||
| GPUBatch *DRW_cache_curve_edge_normal_get(Object *ob) | GPUBatch *DRW_cache_curve_edge_normal_get(Object *ob) | ||||
| { | { | ||||
| BLI_assert(ob->type == OB_CURVES_LEGACY); | BLI_assert(ob->type == OB_CURVES_LEGACY); | ||||
| struct Curve *cu = ob->data; | struct Curve *cu = ob->data; | ||||
| return DRW_curve_batch_cache_get_normal_edge(cu); | return DRW_curve_batch_cache_get_normal_edge(cu); | ||||
| } | } | ||||
| GPUBatch *DRW_cache_curve_edge_overlay_get(Object *ob) | GPUBatch *DRW_cache_curve_edge_overlay_get(Object *ob) | ||||
| ▲ Show 20 Lines • Show All 87 Lines • ▼ Show 20 Lines | |||||
| } | } | ||||
| GPUBatch *DRW_cache_pointcloud_surface_get(Object *object) | GPUBatch *DRW_cache_pointcloud_surface_get(Object *object) | ||||
| { | { | ||||
| BLI_assert(object->type == OB_POINTCLOUD); | BLI_assert(object->type == OB_POINTCLOUD); | ||||
| return DRW_pointcloud_batch_cache_get_surface(object); | return DRW_pointcloud_batch_cache_get_surface(object); | ||||
| } | } | ||||
| GPUBatch *DRW_cache_pointcloud_surface_viewer_attribute_get(Object *object) | |||||
| { | |||||
| BLI_assert(object->type == OB_POINTCLOUD); | |||||
| return DRW_pointcloud_batch_cache_get_surface_viewer_attribute(object); | |||||
| } | |||||
| /** \} */ | /** \} */ | ||||
| /* -------------------------------------------------------------------- */ | /* -------------------------------------------------------------------- */ | ||||
| /** \name Volume | /** \name Volume | ||||
| * \{ */ | * \{ */ | ||||
| GPUBatch *DRW_cache_volume_face_wireframe_get(Object *ob) | GPUBatch *DRW_cache_volume_face_wireframe_get(Object *ob) | ||||
| { | { | ||||
| ▲ Show 20 Lines • Show All 348 Lines • ▼ Show 20 Lines | void DRW_cdlayer_attr_aliases_add(GPUVertFormat *format, | ||||
| GPU_vertformat_alias_add(format, attr_name); | GPU_vertformat_alias_add(format, attr_name); | ||||
| /* Auto layer name. */ | /* Auto layer name. */ | ||||
| BLI_snprintf(attr_name, sizeof(attr_name), "a%s", attr_safe_name); | BLI_snprintf(attr_name, sizeof(attr_name), "a%s", attr_safe_name); | ||||
| GPU_vertformat_alias_add(format, attr_name); | GPU_vertformat_alias_add(format, attr_name); | ||||
| /* Active render layer name. */ | /* Active render layer name. */ | ||||
| if (is_active_render) { | if (is_active_render) { | ||||
| GPU_vertformat_alias_add(format, base_name); | GPU_vertformat_alias_add(format, cl->type == CD_MLOOPUV ? "a" : base_name); | ||||
| } | } | ||||
| /* Active display layer name. */ | /* Active display layer name. */ | ||||
| if (is_active_layer) { | if (is_active_layer) { | ||||
| BLI_snprintf(attr_name, sizeof(attr_name), "a%s", base_name); | BLI_snprintf(attr_name, sizeof(attr_name), "a%s", base_name); | ||||
| GPU_vertformat_alias_add(format, attr_name); | GPU_vertformat_alias_add(format, attr_name); | ||||
| } | } | ||||
| } | } | ||||