OpenSubdiv/examples/glStencilViewer
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 WIP limit stencils factory 2014-09-12 16:59:16 -07:00
glStencilViewer.cpp Experiment separating out Ptex from TopologyRefiner. 2015-04-21 17:34:02 -07:00
init_shapes.h Add test shapes to glStencilViewer code example (gregory test 6 & 7) 2014-11-11 11:29:33 -08:00