27 IndexBuffer(IPType
type, uint32_t numPrimitives,
size_t indexSize,
bool createStorage =
true);
37 inline IPType GetPrimitiveType()
const;
38 inline uint32_t GetNumPrimitives()
const;
39 inline bool IsIndexed()
const;
45 void SetNumActivePrimitives(uint32_t numActive);
46 inline uint32_t GetNumActivePrimitives()
const;
47 uint32_t GetNumActiveIndices()
const;
54 void SetFirstPrimitive(uint32_t
first);
55 inline uint32_t GetFirstPrimitive()
const;
56 uint32_t GetFirstIndex()
const;
70 bool SetPoint(uint32_t i, uint32_t
v);
71 bool GetPoint(uint32_t i, uint32_t& v)
const;
72 bool SetSegment(uint32_t i, uint32_t
v0, uint32_t
v1);
73 bool GetSegment(uint32_t i, uint32_t& v0, uint32_t& v1)
const;
74 bool SetTriangle(uint32_t i, uint32_t v0, uint32_t v1, uint32_t
v2);
75 bool GetTriangle(uint32_t i, uint32_t& v0, uint32_t& v1, uint32_t& v2)
const;
87 inline bool ValidPrimitiveType(IPType type)
const;
89 typedef uint32_t(*ICFunction)(uint32_t);
90 static ICFunction msIndexCounter[IP_NUM_TYPES];
92 static uint32_t GetPolypointIndexCount(uint32_t numPrimitives);
93 static uint32_t GetPolysegmentDisjointIndexCount(uint32_t numPrimitives);
94 static uint32_t GetPolysegmentContiguousIndexCount(uint32_t numPrimitives);
95 static uint32_t GetTrimeshIndexCount(uint32_t numPrimitives);
96 static uint32_t GetTristripIndexCount(uint32_t numPrimitives);
97 static uint32_t GetPolysegmentDisjointAdjIndexCount(uint32_t numPrimitives);
98 static uint32_t GetPolysegmentContiguousAdjIndexCount(uint32_t numPrimitives);
99 static uint32_t GetTrimeshAdjIndexCount(uint32_t numPrimitives);
100 static uint32_t GetTristripAdjIndexCount(uint32_t numPrimitives);
106 return mPrimitiveType;
111 return mNumPrimitives;
116 return mData !=
nullptr;
121 return mNumActivePrimitives;
126 return mFirstPrimitive;
131 if ((mPrimitiveType & type) != 0)
137 #if defined(GTE_VERIFY_PRIMITIVE_TYPE) 138 LogError(
"Invalid primitive type used in Set<Primitive> call.");
uint32_t GetNumPrimitives() const
uint32_t GetNumActivePrimitives() const
#define LogError(message)
uint32_t GetFirstPrimitive() const
bool ValidPrimitiveType(IPType type) const
IPType GetPrimitiveType() const
GLfloat GLfloat GLfloat v2
uint32_t mNumActivePrimitives
GLint GLint GLsizei GLint GLenum GLenum type