mirror of
https://github.com/PixarAnimationStudios/OpenSubdiv
synced 2024-11-24 04:20:21 +00:00
Fixed build for uniformEvaluator if omp not found, add a public domain teapot test .obj file.
This commit is contained in:
parent
ecd726742f
commit
81b4aec1f5
9966
examples/projectTest/teapot.obj
Normal file
9966
examples/projectTest/teapot.obj
Normal file
File diff suppressed because it is too large
Load Diff
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user