OpenSubdiv/examples/glShareTopology
George ElKoura 420473b45b Experiment separating out Ptex from TopologyRefiner.
Remove the ptex-specific code from the Far::TopologyRefiner and instead provide it in a separate class Far::PtexIndices.  Clients who need to use the Ptex API need to first build a Far::PtexIndices object by providing it with a refiner.

This has the advantage of keeping the API on the TopologyRefiner a little cleaner.  The ptex methods were const but were mutating state with const_casts.  The new mechanism still achieves the same lazy initialization behavior by forcing clients to instantiate them exactly when needed.

A disadvantage of this approach is that the PatchTablesFactory creates its own PtexIndices and throws it out after the patch tables are created.  This is great if you're never going to need the ptex indices again, but not so great if you will need them again.
2015-04-21 17:34:02 -07:00
..
CMakeLists.txt Landing 3.0.0.alpha 2014-09-05 15:07:46 -07:00
glShareTopology.cpp Experiment separating out Ptex from TopologyRefiner. 2015-04-21 17:34:02 -07:00
shader.glsl Landing 3.0.0.alpha 2014-09-05 15:07:46 -07:00