71 switch (boundary_smooth) {
102#ifdef WITH_OPENSUBDIV
107 topology_refiner_settings.
level = settings->level;
108 topology_refiner_settings.
is_adaptive = settings->is_adaptive;
112 converter, topology_refiner_settings);
119 Subdiv *subdiv = MEM_cnew<Subdiv>(__func__);
125 subdiv->
stats = stats;
135 if (mesh->verts_num == 0) {
151#ifdef WITH_OPENSUBDIV
153 bool can_reuse_subdiv =
true;
156 can_reuse_subdiv =
false;
165 can_reuse_subdiv =
false;
167 if (can_reuse_subdiv) {
171 if (subdiv !=
nullptr) {
194#ifdef WITH_OPENSUBDIV
221#ifdef WITH_OPENSUBDIV
226 if (topology_refiner ==
nullptr) {
229 const int num_coarse_faces = topology_refiner->
base_level().GetNumFaces();
233 for (
int face_index = 0; face_index < num_coarse_faces; face_index++) {
234 const int face_size = topology_refiner->
base_level().GetFaceVertices(face_index).size();
235 const int num_ptex_faces = face_size == 4 ? 1 : face_size;
237 ptex_offset += num_ptex_faces;
void(* BKE_subsurf_modifier_free_gpu_cache_cb)(blender::bke::subdiv::Subdiv *subdiv)
#define BLI_assert_msg(a, msg)
@ SUBSURF_BOUNDARY_SMOOTH_ALL
@ SUBSURF_BOUNDARY_SMOOTH_PRESERVE_CORNERS
@ SUBSURF_UV_SMOOTH_PRESERVE_CORNERS_AND_JUNCTIONS
@ SUBSURF_UV_SMOOTH_PRESERVE_CORNERS
@ SUBSURF_UV_SMOOTH_PRESERVE_BOUNDARIES
@ SUBSURF_UV_SMOOTH_PRESERVE_CORNERS_JUNCTIONS_AND_CONCAVE
Read Guarded memory(de)allocation.
const OpenSubdiv::Far::TopologyLevel & base_level() const
static TopologyRefinerImpl * createFromConverter(OpenSubdiv_Converter *converter, const OpenSubdiv_TopologyRefinerSettings &settings)
bool isEqualToConverter(const OpenSubdiv_Converter *converter) const
void openSubdiv_deleteEvaluator(OpenSubdiv_Evaluator *evaluator)
void *(* MEM_malloc_arrayN)(size_t len, size_t size, const char *str)
void MEM_freeN(void *vmemh)
void free(Subdiv *subdiv)
void converter_init_for_mesh(OpenSubdiv_Converter *converter, const Settings *settings, const Mesh *mesh)
@ SUBDIV_VTX_BOUNDARY_EDGE_AND_CORNER
@ SUBDIV_VTX_BOUNDARY_EDGE_ONLY
@ SUBDIV_FVAR_LINEAR_INTERPOLATION_CORNERS_AND_JUNCTIONS
@ SUBDIV_FVAR_LINEAR_INTERPOLATION_BOUNDARIES
@ SUBDIV_FVAR_LINEAR_INTERPOLATION_NONE
@ SUBDIV_FVAR_LINEAR_INTERPOLATION_CORNERS_ONLY
@ SUBDIV_FVAR_LINEAR_INTERPOLATION_CORNERS_JUNCTIONS_AND_CONCAVE
@ SUBDIV_FVAR_LINEAR_INTERPOLATION_ALL
Subdiv * new_from_mesh(const Settings *settings, const Mesh *mesh)
void stats_init(SubdivStats *stats)
void displacement_detach(Subdiv *subdiv)
FVarLinearInterpolation fvar_interpolation_from_uv_smooth(int uv_smooth)
Subdiv * update_from_converter(Subdiv *subdiv, const Settings *settings, OpenSubdiv_Converter *converter)
Subdiv * new_from_converter(const Settings *settings, OpenSubdiv_Converter *converter)
void stats_begin(SubdivStats *stats, StatsValue value)
int * face_ptex_offset_get(Subdiv *subdiv)
void stats_end(SubdivStats *stats, StatsValue value)
void converter_free(OpenSubdiv_Converter *converter)
VtxBoundaryInterpolation vtx_boundary_interpolation_from_subsurf(int boundary_smooth)
@ SUBDIV_STATS_TOPOLOGY_REFINER_CREATION_TIME
@ SUBDIV_STATS_TOPOLOGY_COMPARE
Subdiv * update_from_mesh(Subdiv *subdiv, const Settings *settings, const Mesh *mesh)
bool settings_equal(const Settings *settings_a, const Settings *settings_b)
void openSubdiv_cleanup()
@ OPENSUBDIV_EVALUATOR_CPU
int(* getNumVertices)(const OpenSubdiv_Converter *converter)
eOpenSubdivEvaluator type
VtxBoundaryInterpolation vtx_boundary_interpolation
FVarLinearInterpolation fvar_linear_interpolation
Displacement * displacement_evaluator
struct blender::bke::subdiv::Subdiv::@63 cache_
OpenSubdiv_Evaluator * evaluator
blender::opensubdiv::TopologyRefinerImpl * topology_refiner