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" 38 namespace OPENSUBDIV_VERSION
48 template<
typename DEVICE_CONTEXT>
50 return Create(farPatchTable, context);
55 void UpdateVertexBuffer(id<MTLBuffer> vbo,
int numVertices,
int numVertexElements,
MTLContext* context);
64 return _vertexValenceBuffer;
69 return _quadOffsetsBuffer;
74 if(type == Far::PatchDescriptor::GREGORY_BOUNDARY)
75 return _quadOffsetsBase[1];
76 return _quadOffsetsBase[0];
80 id<MTLBuffer> _vertexBuffer;
81 id<MTLBuffer> _vertexValenceBuffer;
82 id<MTLBuffer> _quadOffsetsBuffer;
83 int _quadOffsetsBase[2];
87 using namespace OPENSUBDIV_VERSION;
90 #endif // OPENSUBDIV3_OSD_MTL_LEGACY_GREGORY_PATCH_TABLE_H id< MTLBuffer > GetQuadOffsetsBuffer() const
Container for arrays of parametric patches.
id< MTLBuffer > GetVertexBuffer() const
id< MTLBuffer > GetVertexValenceBuffer() const
static MTLLegacyGregoryPatchTable * Create(Far::PatchTable const *farPatchTable, DEVICE_CONTEXT context)
int GetQuadOffsetsBase(Far::PatchDescriptor::Type type)