OpenSubdiv: Changes in C-API
- Made OpenSubdiv_GLMesh private Previously, it was still accessible via C-API from C++ code. - Don't implicitly refine evaluator when updating coarse positions, now there is an explicit call to do this. Allows to first apply all changes to the coarse mesh and then refine once. - Added coarse positions update from a continuous buffer with given starts offset and stride. Allows to update coarse positions directly from MVert array. - Refiner is no longer freed when CPU evaluator is created. Allows to re-use refiner for multiple purposes.
This commit is contained in:
@@ -198,7 +198,7 @@ void ccgSubSurf_checkTopologyChanged(CCGSubSurf *ss, DerivedMesh *dm)
|
||||
ss->osd_topology_refiner = NULL;
|
||||
}
|
||||
|
||||
/* Reste CPU side. */
|
||||
/* Reset CPU side. */
|
||||
if (ss->osd_evaluator != NULL) {
|
||||
openSubdiv_deleteEvaluatorDescr(ss->osd_evaluator);
|
||||
ss->osd_evaluator = NULL;
|
||||
@@ -523,6 +523,7 @@ static void opensubdiv_updateEvaluatorCoarsePositions(CCGSubSurf *ss)
|
||||
(float *)positions,
|
||||
0,
|
||||
num_basis_verts);
|
||||
openSubdiv_refineEvaluator(ss->osd_evaluator);
|
||||
|
||||
MEM_freeN(positions);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user