13 #ifndef RE_VERTEX_ARRAY_H 
   14 #define RE_VERTEX_ARRAY_H 
   18 class RE_OGLConstAttribute;
 
   37                                           const char *cachename = 
nullptr,
 
   42                                            const char *cachename = 
nullptr,
 
   47                                              const char *cachename = 
nullptr,
 
   51                                              const char *cachename = 
nullptr,
 
   58                                               const char *cachename);
 
   68     int64       getMemoryUsage(
bool inclusive) 
const;
 
   72                     { myCacheName = 
name; }
 
   83     void                markAsUnused(
bool move_to_unused_cache = 
true);
 
   84     bool                isUsed()
 const { 
return myInUse; }
 
  105     void        resetBuffer(
bool delete_cached = 
false,
 
  106                             bool mark_as_unused = 
true);
 
  125     void        setAttributeName(
const char *attrib);
 
  133     void        setLength(
int len);
 
  137     bool        setCapacity(
int cap);
 
  141     void        setInstanceStride(
int nprims);
 
  145                     { myInstanceGroup = instance_group; }
 
  159                           int array_index = 0);
 
  164                     {  
return setArray(r,data, 0,myLength, array_index); }
 
  171                     { 
return setArray(r, data, offset, length, array_index); }
 
  181                          int array_index = 0) 
const;
 
  194     void         createConstant();
 
  198     const fpreal64 *getConstant() 
const;
 
  212                      int array_index = 0);
 
  215                           int array_index = 0);
 
  216     void         unmap(
RE_Render *
r, 
int array_index = 0);
 
  221     void                *getPersistentMap(
int array_index = 0) 
const;
 
  224     bool                isPersistentMap() 
const;
 
  244                       const char *shader_attrib = 
nullptr);
 
  252     bool        setupForAttribIndex(
RE_Render *
r, 
int attrib_location,
 
  274                           int vertices_per_patch);
 
  283                               int vertices_per_patch);
 
  291                               int index_num_elements,
 
  294                               int vertices_per_patch);
 
  305             { 
return (i < myArray.entries()) ? myArray(i) : theNullArray; }
 
  308     bool                isBufferBound(
int array_index=0) 
const;
 
  315     int64               getSizeBytes() 
const;
 
  318     void                print(std::ostream *os = 
nullptr) 
const;
 
  319     void                printValues(
RE_Render *
r, std::ostream &os,
 
  320                                     int start=0, 
int len=0) 
const;
 
  322     void                addRef(
void (*callback)(
void *), 
void *
data);
 
  323     void                removeRef(
void (*callback)(
void *), 
void *
data);
 
  341     void                detachTexBuffer(
int index);
 
  361     bool                myMappedFlag[4];
 
  399     bool            isValid() { 
return myArray!=
nullptr; }
 
  416     static void arrayDeleted(
void *);
 
bool replaceArrayRange(RE_Render *r, const void *data, int offset, int length, int array_index)
 
RE_GenericAttribID getGenericID() const 
 
UT_StringHolder myAttribName
 
int getNumBuffers() const 
 
void setArrayType(RE_ArrayType t)
 
const RE_VertexArray * operator->() const 
 
UT_Array< re_VertexArrayCB > myRefs
 
void cacheBuffer(const UT_StringHolder &name)
 
GLuint GLsizei GLsizei * length
 
bool isDefaultValue() const 
 
UT_StringHolder myCacheName
 
RE_PersistentBufferMode myPersistentBufferMode
 
RE_GenericAttribID myGenID
 
RE_OGLConstAttribute * myConstAttrib
 
std::unique_ptr< T, Deleter > UT_UniquePtr
A smart pointer for unique ownership of dynamically allocated objects. 
 
const char * getAttributeName() const 
 
RE_BufferType myBufferType
 
GLint GLint GLsizei GLint GLenum GLenum type
 
bool isConstantBuffer() const 
 
RE_CacheTagHandle myCacheTagHandle
 
RE_GPUType getDataType() const 
 
GLuint GLint GLboolean GLint GLenum access
 
void setGenericID(RE_GenericAttribID id)
 
void allowShared(bool shared)
 
GLint GLenum GLboolean GLsizei stride
 
#define UT_NON_COPYABLE(CLASS)
Define deleted copy constructor and assignment operator inside a class. 
 
Wrapper around hboost::intrusive_ptr. 
 
int getLengthScale() const 
 
GLuint const GLchar * name
 
OPENVDB_API void initialize()
Global registration of native Grid, Transform, Metadata and Point attribute types. Also initializes blosc (if enabled). 
 
GLint GLenum GLboolean normalized
 
bool replaceArray(RE_Render *r, const void *data, int array_index=0)
 
int getInstanceStride() const 
 
bool myPersistentMapCopied
 
RE_BufferUsageHint myUsage
 
void markAsDefaultValue(bool def)
 
static RE_OGLBufferHandle theNullArray
 
GLfloat GLfloat GLfloat GLfloat h
 
re_VertexArrayCB(void(*cb)(void *), void *d)
 
LeafData & operator=(const LeafData &)=delete
 
const RE_OGLBufferHandle & getArrayBuffer(int i=0) const 
 
RE_VertexArray * operator->()
 
const char * getCacheName() const 
 
RE_ArrayType getArrayType() const 
 
RE_Texture * getTextureBufferObject() const 
 
Simple class for a mutli-integer cache tag. 
 
UT_Array< RE_OGLBufferHandle > myArray
 
int getInstanceGroup() const 
 
int getVectorSize() const 
 
FMT_INLINE void print(format_string< T...> fmt, T &&...args)
 
RE_BufferType getBufferType() const 
 
void setInstanceGroup(int instance_group)