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"
37namespace OPENSUBDIV_VERSION {
42:
private NonCopyable<MTLLegacyGregoryPatchTable>
47 template<
typename DEVICE_CONTEXT>
49 return Create(farPatchTable, 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];
88using namespace OPENSUBDIV_VERSION;
Container for arrays of parametric patches.
int GetQuadOffsetsBase(Far::PatchDescriptor::Type type)
static MTLLegacyGregoryPatchTable * Create(Far::PatchTable const *farPatchTable, DEVICE_CONTEXT context)
id< MTLBuffer > GetVertexValenceBuffer() const
id< MTLBuffer > GetQuadOffsetsBuffer() const
static MTLLegacyGregoryPatchTable * Create(Far::PatchTable const *farPatchTable, MTLContext *context)
void UpdateVertexBuffer(id< MTLBuffer > vbo, int numVertices, int numVertexElements, MTLContext *context)
~MTLLegacyGregoryPatchTable()
id< MTLBuffer > GetVertexBuffer() const