All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RE_OGLVertexBuffer Class Reference

#include <RE_OGLBuffer.h>

+ Inheritance diagram for RE_OGLVertexBuffer:

Public Member Functions

 RE_OGLVertexBuffer (RE_BufferType type, int num_elements, int capacity=-1)
bool enable (RE_Render *r, unsigned int stride=0, bool geo_object=false) override
bool disable (RE_Render *r) override
void draw (RE_Render *r, RE_PrimType prim_type, unsigned int stride, int num_instanced, int vertices_per_patch) override
void drawRange (RE_Render *r, RE_PrimType prim_type, int start, int num, int num_instanced, int vertices_per_patch) override
void drawElements (RE_Render *r, RE_PrimType prim_type, RE_OGLBuffer *element_bufer, int offset, int num, int num_instanced, int vertices_per_patch) override
int64 getMemoryUsage (bool inclusive) const override
- Public Member Functions inherited from RE_OGLBuffer
 RE_OGLBuffer (RE_BufferType type, int num_elements, int capacity=-1)
void setBufferType (RE_BufferType type)
void setAttributeName (const char *attrib)
bool setFormat (RE_GPUType type, int vectorsize)
void setNormalizedFormat (bool normalize=true)
bool setLength (int len)
bool setCapacity (int size)
void setInstanceStride (int nprim)
void setUsage (RE_BufferUsageHint hint)
void setPersistentBuffer (RE_PersistentBufferMode mode)
void setSubComponentIndex (int index)
void setLabel (RE_Render *, const char *)
bool setData (RE_Render *r, const void *data, int offset=0, int sublen=0)
bool replaceData (RE_Render *r, const void *subdata, int suboffset, int sublength)
bool getData (RE_Render *, void *data, int offset=0, int sublen=0) const
void orphan (RE_Render *r)
bool rebindAttrib (RE_Render *r, int location, int stride=-1, RE_GPUType *type=nullptr)
bool unbindAttrib (RE_Render *r)
bool bindBuffer (RE_Render *r, RE_BufferBinding point, int bind_index=0)
bool unbindBuffer (RE_Render *r, RE_BufferBinding point, int bind_index=0)
voidmap (RE_Render *r, RE_BufferAccess access=RE_BUFFER_WRITE_ONLY)
voidmapRange (RE_Render *r, int offset, int length, RE_BufferAccess access=RE_BUFFER_WRITE_ONLY)
void unmap (RE_Render *r)
voidgetPersistentMap () const
int64 getSizeBytes () const
 Graphics memory usage estimate. More...
RE_BufferType getBufferType () const
RE_GPUType getDataType () const
int getVectorSize () const
int getSubComponentIndex () const
int getLength () const
int getCapacity () const
int getInstanceStride () const
const char * getAttributeName () const
bool isBound () const
bool isMapped () const
bool isEnabled () const
RE_BufferAccess getMapAccess () const
int getID () const
uint32 getBufferOffset () const
uint32 getBufferSize () const
bool isBufferShared () const
int getUniqueID () const
bool setEnabled (bool enabled)
void incref ()
void decref ()
int getRefCount () const
void setTBO (RE_OGLTexture *tbo)
RE_OGLTexturegetTBO () const
void allowSharedBuffer (bool b=true)
void commitMappedData (RE_Render *r)
void markAsUsed ()
void markAsUnused ()
bool isUsed () const
int getUseCount () const
- Public Member Functions inherited from RE_CachedObjectBase
 RE_CachedObjectBase ()
virtual ~RE_CachedObjectBase ()
void setVersion (RE_CacheVersion v)
RE_CacheVersion getVersion () const
void setExtraData (RE_CachedExtraData *data)
const RE_CachedExtraDataHandlegetExtraData () const
void setCacheTag (RE_CacheTagHandle h)
void resetCacheTag ()
void setInCache (bool c)
bool isInCache () const

Protected Member Functions

 ~RE_OGLVertexBuffer () override
- Protected Member Functions inherited from RE_OGLBuffer
bool initialize (RE_Render *r, const void *data, int length=0)
void resetBuffer ()
void drawArraysCommon (RE_Render *r, RE_PrimType prim, int start, int num, unsigned int stride, int num_instances, int vertices_per_patch)
bool bindAttribute (RE_Render *r, int location, RE_GPUType type, int stride, const void *data)
bool enableAttribArray (RE_Render *r, const char *name, RE_GPUType datatype, int vectorsize, unsigned int stride, const void *data)
void disableAttribArray (RE_Render *r, const char *name)
 ~RE_OGLBuffer () override

Protected Attributes

bool myBoundByGeoObject
- Protected Attributes inherited from RE_OGLBuffer
UT_String myAttribName
RE_BufferType myBufferType
RE_GPUType myType
int myVectorSize
int mySubIndex
int myNormalized
int myLength
int myCapacity
int myInstanceStride
int myLastStride
int myAttribLocation
RE_BufferUsageHint myUsage
RE_PersistentBufferMode myPersistentBufferMode
RE_BufferAccess myMappedAccess
bool myMappedFlag
bool myBoundFlag
bool myEnableFlag
GLenum myDataType
int myDataSize
GLuint myBufferID
GLuint myBufferOffset
GLuint myBufferSize
bool myBufferShared
bool myAllowSharedBuffer
GLenum myGLBufferType
int64 myRefCount
int myUseCount
int myUniqueID

Additional Inherited Members

- Static Public Member Functions inherited from RE_OGLBuffer
static RE_OGLBuffernewBuffer (RE_BufferType type, int num_elements, const char *name=nullptr, int capacity=-1)
static int getMaxVertexArraySize (RE_Render *r)
static int getMaxElementArraySize (RE_Render *r)
- Public Attributes inherited from RE_CachedObjectBase
RE_CacheVersion myVersion
RE_CacheTagHandle myCacheTagHandle
bool myCachedFlag
RE_CachedExtraDataHandle myExtraData

Detailed Description

Definition at line 380 of file RE_OGLBuffer.h.

Constructor & Destructor Documentation

RE_OGLVertexBuffer::RE_OGLVertexBuffer ( RE_BufferType  type,
int  num_elements,
int  capacity = -1 
RE_OGLVertexBuffer::~RE_OGLVertexBuffer ( )

Member Function Documentation

bool RE_OGLVertexBuffer::disable ( RE_Render r)

Reimplemented from RE_OGLBuffer.

void RE_OGLVertexBuffer::draw ( RE_Render r,
RE_PrimType  prim_type,
unsigned int  stride,
int  num_instanced,
int  vertices_per_patch 

Reimplemented from RE_OGLBuffer.

void RE_OGLVertexBuffer::drawElements ( RE_Render r,
RE_PrimType  prim_type,
RE_OGLBuffer element_bufer,
int  offset,
int  num,
int  num_instanced,
int  vertices_per_patch 

Reimplemented from RE_OGLBuffer.

void RE_OGLVertexBuffer::drawRange ( RE_Render r,
RE_PrimType  prim_type,
int  start,
int  num,
int  num_instanced,
int  vertices_per_patch 

Reimplemented from RE_OGLBuffer.

bool RE_OGLVertexBuffer::enable ( RE_Render r,
unsigned int  stride = 0,
bool  geo_object = false 

Reimplemented from RE_OGLBuffer.

int64 RE_OGLVertexBuffer::getMemoryUsage ( bool  inclusive) const

Returns the amount of main memory (NOT graphics memory!) owned by this RE_OGLVertexBuffer.

Reimplemented from RE_OGLBuffer.

Definition at line 417 of file RE_OGLBuffer.h.

Member Data Documentation

bool RE_OGLVertexBuffer::myBoundByGeoObject

Definition at line 427 of file RE_OGLBuffer.h.

The documentation for this class was generated from the following file: