Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/intern/draw_cache_extract_mesh.cc
| Show First 20 Lines • Show All 557 Lines • ▼ Show 20 Lines | static void mesh_buffer_cache_create_requested(struct TaskGraph *task_graph, | ||||
| Mesh *me, | Mesh *me, | ||||
| const bool is_editmode, | const bool is_editmode, | ||||
| const bool is_paint_mode, | const bool is_paint_mode, | ||||
| const bool is_mode_active, | const bool is_mode_active, | ||||
| const float obmat[4][4], | const float obmat[4][4], | ||||
| const bool do_final, | const bool do_final, | ||||
| const bool do_uvedit, | const bool do_uvedit, | ||||
| const bool use_subsurf_fdots, | |||||
| const Scene *scene, | const Scene *scene, | ||||
| const ToolSettings *ts, | const ToolSettings *ts, | ||||
| const bool use_hide) | const bool use_hide) | ||||
| { | { | ||||
| /* For each mesh where batches needs to be updated a sub-graph will be added to the task_graph. | /* For each mesh where batches needs to be updated a sub-graph will be added to the task_graph. | ||||
| * This sub-graph starts with an extract_render_data_node. This fills/converts the required | * This sub-graph starts with an extract_render_data_node. This fills/converts the required | ||||
| * data from Mesh. | * data from Mesh. | ||||
| * | * | ||||
| ▲ Show 20 Lines • Show All 107 Lines • ▼ Show 20 Lines | |||||
| #ifdef DEBUG_TIME | #ifdef DEBUG_TIME | ||||
| double rdata_start = PIL_check_seconds_timer(); | double rdata_start = PIL_check_seconds_timer(); | ||||
| #endif | #endif | ||||
| MeshRenderData *mr = mesh_render_data_create( | MeshRenderData *mr = mesh_render_data_create( | ||||
| object, me, is_editmode, is_paint_mode, is_mode_active, obmat, do_final, do_uvedit, ts); | object, me, is_editmode, is_paint_mode, is_mode_active, obmat, do_final, do_uvedit, ts); | ||||
| mr->use_hide = use_hide; | mr->use_hide = use_hide; | ||||
| mr->use_subsurf_fdots = use_subsurf_fdots; | mr->use_subsurf_fdots = mr->me && mr->me->runtime.subsurf_face_dot_tags != nullptr; | ||||
| mr->use_final_mesh = do_final; | mr->use_final_mesh = do_final; | ||||
| #ifdef DEBUG_TIME | #ifdef DEBUG_TIME | ||||
| double rdata_end = PIL_check_seconds_timer(); | double rdata_end = PIL_check_seconds_timer(); | ||||
| #endif | #endif | ||||
| eMRIterType iter_type = extractors.iter_types(); | eMRIterType iter_type = extractors.iter_types(); | ||||
| eMRDataType data_flag = extractors.data_types(); | eMRDataType data_flag = extractors.data_types(); | ||||
| ▲ Show 20 Lines • Show All 215 Lines • ▼ Show 20 Lines | void mesh_buffer_cache_create_requested(struct TaskGraph *task_graph, | ||||
| Mesh *me, | Mesh *me, | ||||
| const bool is_editmode, | const bool is_editmode, | ||||
| const bool is_paint_mode, | const bool is_paint_mode, | ||||
| const bool is_mode_active, | const bool is_mode_active, | ||||
| const float obmat[4][4], | const float obmat[4][4], | ||||
| const bool do_final, | const bool do_final, | ||||
| const bool do_uvedit, | const bool do_uvedit, | ||||
| const bool use_subsurf_fdots, | |||||
| const Scene *scene, | const Scene *scene, | ||||
| const ToolSettings *ts, | const ToolSettings *ts, | ||||
| const bool use_hide) | const bool use_hide) | ||||
| { | { | ||||
| blender::draw::mesh_buffer_cache_create_requested(task_graph, | blender::draw::mesh_buffer_cache_create_requested(task_graph, | ||||
| cache, | cache, | ||||
| mbc, | mbc, | ||||
| object, | object, | ||||
| me, | me, | ||||
| is_editmode, | is_editmode, | ||||
| is_paint_mode, | is_paint_mode, | ||||
| is_mode_active, | is_mode_active, | ||||
| obmat, | obmat, | ||||
| do_final, | do_final, | ||||
| do_uvedit, | do_uvedit, | ||||
| use_subsurf_fdots, | |||||
| scene, | scene, | ||||
| ts, | ts, | ||||
| use_hide); | use_hide); | ||||
| } | } | ||||
| void mesh_buffer_cache_create_requested_subdiv(MeshBatchCache *cache, | void mesh_buffer_cache_create_requested_subdiv(MeshBatchCache *cache, | ||||
| MeshBufferCache *mbc, | MeshBufferCache *mbc, | ||||
| DRWSubdivCache *subdiv_cache, | DRWSubdivCache *subdiv_cache, | ||||
| MeshRenderData *mr) | MeshRenderData *mr) | ||||
| { | { | ||||
| blender::draw::mesh_buffer_cache_create_requested_subdiv(cache, mbc, subdiv_cache, mr); | blender::draw::mesh_buffer_cache_create_requested_subdiv(cache, mbc, subdiv_cache, mr); | ||||
| } | } | ||||
| } // extern "C" | } // extern "C" | ||||