7#ifndef PXR_IMAGING_HD_DRAWING_COORD_H
8#define PXR_IMAGING_HD_DRAWING_COORD_H
11#include "pxr/imaging/hd/api.h"
12#include "pxr/imaging/hd/version.h"
16PXR_NAMESPACE_OPEN_SCOPE
68 static const int CustomSlotsBegin = 8;
69 static const int DefaultNumSlots = 3;
70 static const int Unassigned = -1;
75 _instancePrimvar(Unassigned),
80 _faceVaryingPrimvar(5),
81 _topologyVisibility(6),
85 int GetConstantPrimvarIndex()
const {
return _constantPrimvar; }
86 void SetConstantPrimvarIndex(
int slot) { _constantPrimvar = slot; }
87 int GetVertexPrimvarIndex()
const {
return _vertexPrimvar; }
88 void SetVertexPrimvarIndex(
int slot) { _vertexPrimvar = slot; }
89 int GetTopologyIndex()
const {
return _topology; }
90 void SetTopologyIndex(
int slot) { _topology = slot; }
91 int GetElementPrimvarIndex()
const {
return _elementPrimvar; }
92 void SetElementPrimvarIndex(
int slot) { _elementPrimvar = slot; }
93 int GetInstanceIndexIndex()
const {
return _instanceIndex; }
94 void SetInstanceIndexIndex(
int slot) { _instanceIndex = slot; }
95 int GetFaceVaryingPrimvarIndex()
const {
return _faceVaryingPrimvar; }
96 void SetFaceVaryingPrimvarIndex(
int slot) { _faceVaryingPrimvar = slot; }
97 int GetTopologyVisibilityIndex()
const {
return _topologyVisibility; }
98 void SetTopologyVisibilityIndex(
int slot) { _topologyVisibility = slot; }
99 int GetVaryingPrimvarIndex()
const {
return _varyingPrimvar; }
100 void SetVaryingPrimvarIndex(
int slot) { _varyingPrimvar = slot; }
103 void SetInstancePrimvarBaseIndex(
int slot) { _instancePrimvar = slot; }
104 int GetInstancePrimvarIndex(
int level)
const {
105 TF_VERIFY(_instancePrimvar != Unassigned);
106 return _instancePrimvar + level;
111 int16_t _instancePrimvar;
112 int8_t _constantPrimvar;
113 int8_t _vertexPrimvar;
114 int8_t _elementPrimvar;
115 int8_t _instanceIndex;
116 int8_t _faceVaryingPrimvar;
117 int8_t _topologyVisibility;
118 int8_t _varyingPrimvar;
122PXR_NAMESPACE_CLOSE_SCOPE
Low-level utilities for informing users of various internal and external diagnostic conditions.
A tiny set of integers, which provides an indirection mapping from the conceptual space of an HdRprim...
#define TF_VERIFY(cond, format,...)
Checks a condition and reports an error if it evaluates false.