Fixes far_tutorial_6 crash

This commit is contained in:
takahito-tejima 2015-04-21 15:38:51 -07:00
parent 7e3bd65432
commit c4acb578f2

View File

@ -42,6 +42,7 @@
#include <opensubdiv/far/topologyRefinerFactory.h>
#include <opensubdiv/far/patchTablesFactory.h>
#include <opensubdiv/far/endCapGregoryBasisPatchFactory.h>
#include <opensubdiv/far/patchMap.h>
#include <cassert>
@ -154,8 +155,10 @@ int main(int, char **) {
// Generate a set of Far::PatchTables that we will use to evaluate the
// surface limit
Far::EndCapGregoryBasisPatchFactory endcapFactory(*refiner);
Far::PatchTables const * patchTables =
Far::PatchTablesFactory::Create(*refiner);
Far::PatchTablesFactoryT<Far::EndCapGregoryBasisPatchFactory>::Create(
*refiner, Far::PatchTablesFactory::Options(), &endcapFactory);
// Create a Far::PatchMap to help locating patches in the table
Far::PatchMap patchmap(*patchTables);