diff options
Diffstat (limited to 'intern/opensubdiv/internal/evaluator/evaluator_impl.cc')
-rw-r--r-- | intern/opensubdiv/internal/evaluator/evaluator_impl.cc | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/intern/opensubdiv/internal/evaluator/evaluator_impl.cc b/intern/opensubdiv/internal/evaluator/evaluator_impl.cc index 29b2fe3975f..49a59c44be8 100644 --- a/intern/opensubdiv/internal/evaluator/evaluator_impl.cc +++ b/intern/opensubdiv/internal/evaluator/evaluator_impl.cc @@ -166,6 +166,11 @@ EvalOutputAPI::~EvalOutputAPI() delete implementation_; } +void EvalOutputAPI::setSettings(const OpenSubdiv_EvaluatorSettings *settings) +{ + implementation_->updateSettings(settings); +} + void EvalOutputAPI::setCoarsePositions(const float *positions, const int start_vertex_index, const int num_vertices) @@ -435,8 +440,7 @@ OpenSubdiv_EvaluatorImpl::~OpenSubdiv_EvaluatorImpl() OpenSubdiv_EvaluatorImpl *openSubdiv_createEvaluatorInternal( OpenSubdiv_TopologyRefiner *topology_refiner, eOpenSubdivEvaluator evaluator_type, - OpenSubdiv_EvaluatorCacheImpl *evaluator_cache_descr, - const OpenSubdiv_EvaluatorSettings *settings) + OpenSubdiv_EvaluatorCacheImpl *evaluator_cache_descr) { // Only CPU and GLCompute are implemented at the moment. if (evaluator_type != OPENSUBDIV_EVALUATOR_CPU && @@ -455,7 +459,6 @@ OpenSubdiv_EvaluatorImpl *openSubdiv_createEvaluatorInternal( const bool has_face_varying_data = (num_face_varying_channels != 0); const int level = topology_refiner->getSubdivisionLevel(topology_refiner); const bool is_adaptive = topology_refiner->getIsAdaptive(topology_refiner); - const int vertex_data_width = settings->num_vertex_data; // Common settings for stencils and patches. const bool stencil_generate_intermediate_levels = is_adaptive; const bool stencil_generate_offsets = true; @@ -560,17 +563,12 @@ OpenSubdiv_EvaluatorImpl *openSubdiv_createEvaluatorInternal( varying_stencils, all_face_varying_stencils, 2, - vertex_data_width, patch_table, evaluator_cache); } else { - eval_output = new blender::opensubdiv::CpuEvalOutput(vertex_stencils, - varying_stencils, - all_face_varying_stencils, - 2, - vertex_data_width, - patch_table); + eval_output = new blender::opensubdiv::CpuEvalOutput( + vertex_stencils, varying_stencils, all_face_varying_stencils, 2, patch_table); } blender::opensubdiv::PatchMap *patch_map = new blender::opensubdiv::PatchMap(*patch_table); |