Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/intern/draw_cache.c
| Show First 20 Lines • Show All 501 Lines • ▼ Show 20 Lines | switch (ob->type) { | ||||
| case OB_MESH: | case OB_MESH: | ||||
| return DRW_cache_mesh_surface_get(ob); | return DRW_cache_mesh_surface_get(ob); | ||||
| case OB_CURVE: | case OB_CURVE: | ||||
| return DRW_cache_curve_surface_get(ob); | return DRW_cache_curve_surface_get(ob); | ||||
| case OB_SURF: | case OB_SURF: | ||||
| return DRW_cache_surf_surface_get(ob); | return DRW_cache_surf_surface_get(ob); | ||||
| case OB_FONT: | case OB_FONT: | ||||
| return DRW_cache_text_surface_get(ob); | return DRW_cache_text_surface_get(ob); | ||||
| case OB_MBALL: | |||||
| return DRW_cache_mball_surface_get(ob); | |||||
| default: | default: | ||||
| return NULL; | return NULL; | ||||
| } | } | ||||
| } | } | ||||
| Gwn_Batch **DRW_cache_object_surface_material_get( | Gwn_Batch **DRW_cache_object_surface_material_get( | ||||
| struct Object *ob, struct GPUMaterial **gpumat_array, uint gpumat_array_len) | struct Object *ob, struct GPUMaterial **gpumat_array, uint gpumat_array_len) | ||||
| { | { | ||||
| ▲ Show 20 Lines • Show All 1,813 Lines • ▼ Show 20 Lines | Gwn_Batch *DRW_cache_curve_surface_get(Object *ob) | ||||
| struct Curve *cu = ob->data; | struct Curve *cu = ob->data; | ||||
| return DRW_curve_batch_cache_get_triangles_with_normals(cu, ob->curve_cache); | return DRW_curve_batch_cache_get_triangles_with_normals(cu, ob->curve_cache); | ||||
| } | } | ||||
| /** \} */ | /** \} */ | ||||
| /* -------------------------------------------------------------------- */ | /* -------------------------------------------------------------------- */ | ||||
| /** \name MetaBall | |||||
| * \{ */ | |||||
| Gwn_Batch *DRW_cache_mball_surface_get(Object *ob) | |||||
| { | |||||
| BLI_assert(ob->type == OB_MBALL); | |||||
| return DRW_metaball_batch_cache_get_triangles_with_normals(ob); | |||||
| } | |||||
| /** \} */ | |||||
| /* -------------------------------------------------------------------- */ | |||||
| /** \name Font | /** \name Font | ||||
| * \{ */ | * \{ */ | ||||
| Gwn_Batch *DRW_cache_text_edge_wire_get(Object *ob) | Gwn_Batch *DRW_cache_text_edge_wire_get(Object *ob) | ||||
| { | { | ||||
| BLI_assert(ob->type == OB_FONT); | BLI_assert(ob->type == OB_FONT); | ||||
| struct Curve *cu = ob->data; | struct Curve *cu = ob->data; | ||||
| ▲ Show 20 Lines • Show All 230 Lines • Show Last 20 Lines | |||||