mirror of
https://github.com/PixarAnimationStudios/OpenSubdiv
synced 2025-01-11 09:00:08 +00:00
Fixed d3d11 and gl mesh wrappers to be
consistent wrt the MeshInterface API.
This commit is contained in:
parent
6cc24d32fd
commit
b11d5e22f0
@ -65,14 +65,14 @@ public:
|
||||
_drawContext(0),
|
||||
_d3d11DeviceContext(d3d11DeviceContext)
|
||||
{
|
||||
D3D11MeshInterface::refineMesh(*_refiner, level, bits.test(MeshAdaptive));
|
||||
D3D11MeshInterface::refineMesh(*_refiner, level, bits.test(MeshAdaptive), bits.test(MeshUseSingleCreasePatch));
|
||||
|
||||
int numElements =
|
||||
initializeVertexBuffers(numVertexElements, numVaryingElements, bits);
|
||||
|
||||
initializeComputeContext(numVertexElements, numVaryingElements);
|
||||
|
||||
initializeDrawContext(numElements, bits);
|
||||
initializeDrawContext(numElements, level, bits);
|
||||
}
|
||||
|
||||
Mesh(ComputeController * computeController,
|
||||
@ -193,11 +193,11 @@ private:
|
||||
delete varyingStencils;
|
||||
}
|
||||
|
||||
void initializeDrawContext(int numElements, MeshBitset bits) {
|
||||
void initializeDrawContext(int numElements, int level, MeshBitset bits) {
|
||||
|
||||
assert(_refiner and _vertexBuffer);
|
||||
|
||||
Far::PatchTablesFactory::Options options;
|
||||
Far::PatchTablesFactory::Options options(level);
|
||||
options.generateFVarTables = bits.test(MeshFVarData);
|
||||
|
||||
_patchTables = Far::PatchTablesFactory::Create(*_refiner, options);
|
||||
@ -272,14 +272,14 @@ public:
|
||||
_drawContext(0),
|
||||
_d3d11DeviceContext(d3d11DeviceContext)
|
||||
{
|
||||
D3D11MeshInterface::refineMesh(*_refiner, level, bits.test(MeshAdaptive));
|
||||
D3D11MeshInterface::refineMesh(*_refiner, level, bits.test(MeshAdaptive), bits.test(MeshUseSingleCreasePatch));
|
||||
|
||||
int numElements =
|
||||
initializeVertexBuffers(numVertexElements, numVaryingElements, bits);
|
||||
|
||||
initializeComputeContext(numVertexElements, numVaryingElements);
|
||||
|
||||
initializeDrawContext(numElements, bits);
|
||||
initializeDrawContext(numElements, level, bits);
|
||||
}
|
||||
|
||||
Mesh(ComputeController * computeController,
|
||||
@ -399,11 +399,11 @@ private:
|
||||
delete varyingStencils;
|
||||
}
|
||||
|
||||
void initializeDrawContext(int numElements, MeshBitset bits) {
|
||||
void initializeDrawContext(int numElements, int level, MeshBitset bits) {
|
||||
|
||||
assert(_refiner and _vertexBuffer);
|
||||
|
||||
Far::PatchTablesFactory::Options options;
|
||||
Far::PatchTablesFactory::Options options(level);
|
||||
options.generateFVarTables = bits.test(MeshFVarData);
|
||||
|
||||
_patchTables = Far::PatchTablesFactory::Create(*_refiner, options);
|
||||
|
@ -287,7 +287,7 @@ public:
|
||||
|
||||
initializeComputeContext(numVertexElements, numVaryingElements);
|
||||
|
||||
initializeDrawContext(numElements, bits);
|
||||
initializeDrawContext(numElements, level, bits);
|
||||
}
|
||||
|
||||
Mesh(ComputeController * computeController,
|
||||
@ -413,11 +413,11 @@ private:
|
||||
delete varyingStencils;
|
||||
}
|
||||
|
||||
void initializeDrawContext(int numElements, MeshBitset bits) {
|
||||
void initializeDrawContext(int numElements, int level, MeshBitset bits) {
|
||||
|
||||
assert(_refiner and _vertexBuffer);
|
||||
|
||||
Far::PatchTablesFactory::Options options;
|
||||
Far::PatchTablesFactory::Options options(level);
|
||||
options.generateFVarTables = bits.test(MeshFVarData);
|
||||
|
||||
_patchTables = Far::PatchTablesFactory::Create(*_refiner);
|
||||
|
Loading…
Reference in New Issue
Block a user