25#ifndef OPENSUBDIV3_OSD_MTL_PATCH_TABLE_H
26#define OPENSUBDIV3_OSD_MTL_PATCH_TABLE_H
28#include "../version.h"
29#include "../far/patchDescriptor.h"
30#include "../osd/nonCopyable.h"
31#include "../osd/types.h"
32#include "../osd/mtlCommon.h"
38namespace OPENSUBDIV_VERSION {
53 template<
typename DEVICE_CONTEXT>
56 return Create(farPatchTable, context);
93using namespace OPENSUBDIV_VERSION;
std::vector< PatchArray > PatchArrayVector
Container for arrays of parametric patches.
PatchArrayVector const & GetPatchArrays() const
bool allocate(Far::PatchTable const *farPatchTable, MTLContext *context)
static MTLPatchTable * Create(Far::PatchTable const *farPatchTable, MTLContext *context)
id< MTLBuffer > GetVaryingPatchIndexBuffer() const
std::vector< id< MTLBuffer > > _fvarIndexBuffers
id< MTLBuffer > GetFVarPatchParamBuffer(int fvarChannel=0) const
id< MTLBuffer > GetPatchParamBuffer() const
id< MTLBuffer > GetPatchIndexBuffer() const
PatchArrayVector _patchArrays
id< MTLBuffer > VertexBufferBinding
int GetNumFVarChannels() const
PatchArrayVector const & GetFVarPatchArrays(int fvarChannel=0) const
id< MTLBuffer > _varyingPatchIndexBuffer
std::vector< id< MTLBuffer > > _fvarParamBuffers
std::vector< PatchArrayVector > _fvarPatchArrays
id< MTLBuffer > _patchParamBuffer
PatchArrayVector _varyingPatchArrays
static MTLPatchTable * Create(Far::PatchTable const *farPatchTable, DEVICE_CONTEXT context)
id< MTLBuffer > GetFVarPatchIndexBuffer(int fvarChannel=0) const
PatchArrayVector const & GetVaryingPatchArrays() const
id< MTLBuffer > _indexBuffer