diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-08-25 16:05:28 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-08-25 16:11:56 +0300 |
commit | f1e68474e051667b85ac804bded8fa2c8e0ff374 (patch) | |
tree | 9e3470179f56bff64807d944ad8af32141fcbc45 /intern/opensubdiv/opensubdiv_converter.cc | |
parent | 50917edad54d2be0f5e3a6630382e28ab1fd32e0 (diff) |
OpenSubdiv: Support for multiple materials in solid shading mode
Implementation is less optimal compared to non-opensubdiv drawing but
it is now as good as we can do it without affecting on how patches are
being created by OpenSubdiv.
Diffstat (limited to 'intern/opensubdiv/opensubdiv_converter.cc')
-rw-r--r-- | intern/opensubdiv/opensubdiv_converter.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/intern/opensubdiv/opensubdiv_converter.cc b/intern/opensubdiv/opensubdiv_converter.cc index 09880742895..5d43cafd1f3 100644 --- a/intern/opensubdiv/opensubdiv_converter.cc +++ b/intern/opensubdiv/opensubdiv_converter.cc @@ -574,6 +574,17 @@ int openSubdiv_topologyRefinerGetNumFaces( return base_level.GetNumFaces(); } +int openSubdiv_topologyRefinerGetNumFaceVerts( + const OpenSubdiv_TopologyRefinerDescr *topology_refiner, + int face) +{ + using OpenSubdiv::Far::TopologyLevel; + using OpenSubdiv::Far::TopologyRefiner; + const TopologyRefiner *refiner = (const TopologyRefiner *)topology_refiner; + const TopologyLevel &base_level = refiner->GetLevel(0); + return base_level.GetFaceVertices(face).size(); +} + int openSubdiv_topologyRefnerCompareConverter( const OpenSubdiv_TopologyRefinerDescr *topology_refiner, OpenSubdiv_Converter *converter) |