19 #ifndef RE_ElementArray_h
20 #define RE_ElementArray_h
22 class re_ElementChunk;
38 int64 getMemoryUsage(
bool inclusive)
const;
41 void setCacheName(
const char *cachename);
59 void setPrimitiveType(
RE_PrimType type,
int vertices_per_patch = 0);
63 void setNumPoints(
int points);
68 void tessellateToTriangles(
bool enable);
72 void requirePrimInfo(
bool enable);
76 void requireVertexInfo(
bool enable);
86 bool clear_old =
false,
87 int num_vertex_hint = 0);
92 bool addPrim(
RE_Render *r,
int npnts,
int *pnt_indices,
93 int *prim_info =
nullptr,
94 uint8 *vert_info =
nullptr,
99 bool addPrims(
RE_Render *r,
int npnts,
int *prim_indices,
100 int *prim_info =
nullptr,
101 uint8 *vert_info =
nullptr,
102 bool simple_pindex =
false,
103 int pindex_start = 0);
106 bool addTriangle(
RE_Render *r,
int *pnt_indices,
int *prim_info,
113 bool addTriangleChunk(
RE_Render *r,
int num_triangles,
114 const int *pnt_indices,
115 const int *prim_info =
nullptr,
116 const uint8 *vert_info =
nullptr);
126 void drawInstanced(
RE_Render *r,
int num_instances,
133 int getMinEdges()
const;
134 int getMaxEdges()
const;
139 int getNumArrays()
const;
141 int getNumVertices()
const;
142 int getNumOrigVertices()
const;
148 int64 getSizeBytes()
const;
154 void print(std::ostream &os);
157 void completeElementBuffer(
RE_Render *r);
160 void drawPrivate(
RE_Render *r,
int num_instances,
163 void bumpBufferSizes(
int nprims);
169 bool myUseBaseVertex;
171 bool myUsePrimRestart;
172 bool myLineSegmentMode;
174 bool myRequirePrimInfo;
175 bool myRequireVertInfo;
176 bool myTessellateToTriangles;
182 int myNumOrigVertices;
184 int myVerticesPerPatch;
196 int *myElementBuffer;
198 int myHasGeoPrimInfo;
201 int *myPrimInfoBuffer;
203 int myHasGeoVertInfo;
213 int myLastShaderSerial;
214 int myLastShaderPrimInfoIndex;
215 int myLastShaderVertInfoIndex;
222 return myMinPrimEdges;
228 return myMaxPrimEdges;
240 drawPrivate(r, 0, geo, prim);
251 drawPrivate(r, num_instances, geo, prim);
GLdouble GLdouble GLint GLint const GLdouble * points
A collection of vertex arrays defining a geometry object. This class acts as a wrapper around multipl...
int getVerticesPerPatch() const
RE_PrimType getPrimitiveType() const
void draw(RE_Render *r, RE_Geometry *geo=nullptr, RE_PrimType prim=RE_PRIM_AS_IS)
bool hasGLExtension(RE_Extension e) const
GT_API const UT_StringHolder version
exint entries() const
Alias of size(). size() is preferred.
int getNumPrimitives() const
Simple class for a mutli-integer cache tag.
void drawInstanced(RE_Render *r, int num_instances, RE_Geometry *geo=nullptr, RE_PrimType prim=RE_PRIM_AS_IS)
FMT_INLINE void print(format_string< T...> fmt, T &&...args)