Fixed build for uniformEvaluator if omp not found, add a public domain teapot test .obj file.

This commit is contained in:
Dirk Van Gelder 2013-11-05 23:29:53 -08:00
parent ecd726742f
commit 81b4aec1f5
2 changed files with 9980 additions and 6 deletions

File diff suppressed because it is too large Load Diff

View File

@ -29,9 +29,12 @@
#include "../osd/vertex.h"
#ifdef OPENSUBDIV_HAS_OPENMP
#include <omp.h>
#include "../osd/ompComputeController.h"
#endif
#include "../osd/cpuComputeController.h"
#include <fstream>
@ -213,17 +216,22 @@ PxOsdUtilUniformEvaluator::Refine(
{
const FarMesh<OsdVertex> *fmesh = _refiner->GetFarMesh();
#ifdef OPENSUBDIV_HAS_OPENMP
if (numThreads > 1) {
OsdOmpComputeController ompComputeController(numThreads);
ompComputeController.Refine(_computeContext,
fmesh->GetKernelBatches(),
_vertexBuffer, _vvBuffer);
} else {
OsdCpuComputeController cpuComputeController;
cpuComputeController.Refine(_computeContext,
fmesh->GetKernelBatches(),
_vertexBuffer, _vvBuffer);
return true;
}
#endif
OsdCpuComputeController cpuComputeController;
cpuComputeController.Refine(_computeContext,
fmesh->GetKernelBatches(),
_vertexBuffer, _vvBuffer);
return true;
}