Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/intern/draw_cache_impl_subdivision.cc
| Show First 20 Lines • Show All 992 Lines • ▼ Show 20 Lines | |||||
| struct MeshBatchCache *batch_cache, | struct MeshBatchCache *batch_cache, | ||||
| MeshBufferCache *mbc, | MeshBufferCache *mbc, | ||||
| 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 ToolSettings *ts, | const ToolSettings *ts, | ||||
| const bool /*use_hide*/, | const bool /*use_hide*/, | ||||
| OpenSubdiv_EvaluatorCache *evaluator_cache) | OpenSubdiv_EvaluatorCache *evaluator_cache) | ||||
| { | { | ||||
| SubsurfModifierData *smd = reinterpret_cast<SubsurfModifierData *>( | SubsurfModifierData *smd = reinterpret_cast<SubsurfModifierData *>( | ||||
| BKE_modifiers_findby_session_uuid(ob, &mesh->runtime.subsurf_session_uuid)); | BKE_modifiers_findby_session_uuid(ob, &mesh->runtime.subsurf_session_uuid)); | ||||
| BLI_assert(smd); | BLI_assert(smd); | ||||
| ▲ Show 20 Lines • Show All 182 Lines • ▼ Show 20 Lines | |||||
| struct MeshBatchCache *batch_cache, | struct MeshBatchCache *batch_cache, | ||||
| MeshBufferCache *mbc, | MeshBufferCache *mbc, | ||||
| 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 ToolSettings *ts, | const ToolSettings *ts, | ||||
| const bool use_hide) | const bool use_hide) | ||||
| { | { | ||||
| if (g_evaluator_cache == nullptr) { | if (g_evaluator_cache == nullptr) { | ||||
| g_evaluator_cache = openSubdiv_createEvaluatorCache(OPENSUBDIV_EVALUATOR_GLSL_COMPUTE); | g_evaluator_cache = openSubdiv_createEvaluatorCache(OPENSUBDIV_EVALUATOR_GLSL_COMPUTE); | ||||
| } | } | ||||
| #undef TIME_SUBDIV | #undef TIME_SUBDIV | ||||
| #ifdef TIME_SUBDIV | #ifdef TIME_SUBDIV | ||||
| const double begin_time = PIL_check_seconds_timer(); | const double begin_time = PIL_check_seconds_timer(); | ||||
| #endif | #endif | ||||
| if (!draw_subdiv_create_requested_buffers(scene, | if (!draw_subdiv_create_requested_buffers(scene, | ||||
| ob, | ob, | ||||
| mesh, | mesh, | ||||
| batch_cache, | batch_cache, | ||||
| mbc, | mbc, | ||||
| 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, | |||||
| ts, | ts, | ||||
| use_hide, | use_hide, | ||||
| g_evaluator_cache)) { | g_evaluator_cache)) { | ||||
| return; | return; | ||||
| } | } | ||||
| #ifdef TIME_SUBDIV | #ifdef TIME_SUBDIV | ||||
| const double end_time = PIL_check_seconds_timer(); | const double end_time = PIL_check_seconds_timer(); | ||||
| ▲ Show 20 Lines • Show All 46 Lines • Show Last 20 Lines | |||||