Fixed omissions in osd/mesh.h.

* added `OsdMeshInterface::GetFarMesh` and `OsdMesh::GetFarMesh` to match `OsdGLMesh` and `OsdD3D11Mesh`
* added `interleaved` argument to `OsdMesh::Refine` to match `OsdMeshInterface::Refine`
This commit is contained in:
Nathan Litke 2014-06-27 01:59:20 -07:00
parent 4d36cf8c3c
commit e4d7f3d495

View File

@ -80,6 +80,8 @@ public:
virtual VertexBufferBinding BindVertexBuffer() = 0;
virtual VertexBufferBinding BindVaryingBuffer() = 0;
virtual FarMesh<OsdVertex> const * GetFarMesh() const = 0;
};
template <class VERTEX_BUFFER, class COMPUTE_CONTROLLER, class DRAW_CONTEXT>
@ -164,23 +166,27 @@ public:
_computeController->Refine(_computeContext, _farMesh->GetKernelBatches(), _vertexBuffer, _varyingBuffer);
}
virtual void Refine(OsdVertexBufferDescriptor const *vertexDesc,
OsdVertexBufferDescriptor const *varyingDesc) {
OsdVertexBufferDescriptor const *varyingDesc,
bool interleaved) {
_computeController->Refine(_computeContext, _farMesh->GetKernelBatches(),
_vertexBuffer, _varyingBuffer,
_vertexBuffer, (interleaved ? _vertexBuffer : _varyingBuffer),
vertexDesc, varyingDesc);
}
virtual void Synchronize() {
_computeController->Synchronize();
}
virtual DrawContext * GetDrawContext() {
return _drawContext;
}
virtual VertexBufferBinding BindVertexBuffer() {
return VertexBufferBinding(0);
}
virtual VertexBufferBinding BindVaryingBuffer() {
return VertexBufferBinding(0);
}
virtual DrawContext * GetDrawContext() {
return _drawContext;
virtual FarMesh<OsdVertex> const * GetFarMesh() const {
return _farMesh;
}
private: