69 switch (boundary_smooth) {
100#ifdef WITH_OPENSUBDIV
105 topology_refiner_settings.
level = settings->
level;
110 converter, topology_refiner_settings);
123 subdiv->
stats = stats;
149#ifdef WITH_OPENSUBDIV
151 bool can_reuse_subdiv =
true;
154 can_reuse_subdiv =
false;
163 can_reuse_subdiv =
false;
165 if (can_reuse_subdiv) {
169 if (subdiv !=
nullptr) {
192#ifdef WITH_OPENSUBDIV
219#ifdef WITH_OPENSUBDIV
224 if (topology_refiner ==
nullptr) {
227 const int num_coarse_faces = topology_refiner->
base_level().GetNumFaces();
230 for (
int face_index = 0; face_index < num_coarse_faces; face_index++) {
231 const int face_size = topology_refiner->
base_level().GetFaceVertices(face_index).size();
232 const int num_ptex_faces = face_size == 4 ? 1 : face_size;
234 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 * MEM_callocN(size_t len, const char *str)
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
struct blender::bke::subdiv::Subdiv::@57 cache_
Displacement * displacement_evaluator
OpenSubdiv_Evaluator * evaluator
blender::opensubdiv::TopologyRefinerImpl * topology_refiner