25 #ifndef OPENSUBDIV3_OSD_MTL_LEGACY_GREGORY_PATCH_TABLE_H 26 #define OPENSUBDIV3_OSD_MTL_LEGACY_GREGORY_PATCH_TABLE_H 28 #include "../version.h" 29 #include "../far/patchTable.h" 30 #include "../osd/nonCopyable.h" 31 #include "../osd/mtlCommon.h" 37 namespace OPENSUBDIV_VERSION {
42 :
private NonCopyable<MTLLegacyGregoryPatchTable>
47 template<
typename DEVICE_CONTEXT>
49 return Create(farPatchTable, context);
54 void UpdateVertexBuffer(id<MTLBuffer> vbo,
int numVertices,
int numVertexElements,
MTLContext* context);
63 return _vertexValenceBuffer;
68 return _quadOffsetsBuffer;
74 return _quadOffsetsBase[1];
75 return _quadOffsetsBase[0];
79 id<MTLBuffer> _vertexBuffer;
80 id<MTLBuffer> _vertexValenceBuffer;
81 id<MTLBuffer> _quadOffsetsBuffer;
82 int _quadOffsetsBase[2];
88 using namespace OPENSUBDIV_VERSION;
92 #endif // OPENSUBDIV3_OSD_MTL_LEGACY_GREGORY_PATCH_TABLE_H
Container for arrays of parametric patches.
id< MTLBuffer > GetVertexValenceBuffer() const
int GetQuadOffsetsBase(Far::PatchDescriptor::Type type)
static MTLLegacyGregoryPatchTable * Create(Far::PatchTable const *farPatchTable, DEVICE_CONTEXT context)
id< MTLBuffer > GetQuadOffsetsBuffer() const
id< MTLBuffer > GetVertexBuffer() const