#include <polygonbuffer.h>
Inheritance diagram for PolygonStripBuffer:
Public Types | |
enum | BUFFERTYPE { DYNAMIC = 0x00000000, STATIC = 0x00000001, READPRIORITIZED = 0x00000002, WRITEPRIORITIZED = 0x00000004, NOREADWRITE = 0x00000008, NORENDER = 0x00000010, NORMAL = ( DYNAMIC | READPRIORITIZED | WRITEPRIORITIZED ) } |
Buffer type identifiers. Any combination of the flags is valid. More... | |
enum | BUFFERUPLOADPOLICY { ONUNLOCK, ONRENDER, ONFLUSH } |
Upload policy identifiers. More... | |
enum | BUFFERLOCK { READ = 1, WRITE = 2, NOUPLOAD = 4, FORCEUPLOAD = 8 } |
Lock type identifiers. More... | |
Public Member Functions | |
PolygonStripBuffer (unsigned int uiType, unsigned int uiNumPolygons, const unsigned short *pusData=0) | |
virtual | ~PolygonStripBuffer () |
virtual void | AllocateStrip (unsigned int uiNumPolygons, const unsigned short *pusData=0) |
void | LoadStripData (const unsigned short *pusData) |
unsigned short * | GetIndices () |
virtual const void * | GetRenderData () const |
bool | Lock (unsigned int uiLockType) |
void | Unlock () |
virtual void | Upload () |
bool | IsLocked () const |
bool | IsDirty () const |
unsigned int | GetType () const |
unsigned int | GetNumAllocated () const |
unsigned int | GetNumElements () const |
void | SetNumElements (unsigned int uiNumElements) |
void | IncRef () |
void | DecRef () |
int | GetRefCount () const |
Static Public Member Functions | |
std::string | GetTypeAsString (unsigned int uiType) |
unsigned int | GetTypeFromString (std::string const &strType) |
Static Public Attributes | |
BUFFERUPLOADPOLICY | s_eUploadPolicy |
Protected Member Functions | |
virtual bool | AcquireLock () |
virtual void | ReleaseLock () |
Protected Attributes | |
unsigned short * | m_pusBuffer |
unsigned short * | m_pusIndices |
unsigned int | m_uiType |
unsigned int | m_uiLock |
bool | m_bDirty |
unsigned int | m_uiNumAllocated |
unsigned int | m_uiNumCurrent |
|
Buffer type identifiers. Any combination of the flags is valid.
|
|
Upload policy identifiers.
|
|
Lock type identifiers.
|
|
|
|
Free memory |
|
Acquire lock
Implements Buffer. |
|
Release lock Implements Buffer. |
|
Allocate strip buffer. There must be no lock held on the buffer when calling this method
|
|
Load strip data. Must have active WRITE lock
|
|
Lock (READ or WRITE) must be held for pointer to be valid
|
|
Get pointer to render data. Used by derived buffer classes in device with AGP/video RAM storage to return pointer to data used for rendering.
|
|
Lock buffer for read/write operation
|
|
Unlock buffer |
|
Upload data to backing store, reset dirty flag |
|
|
|
|
|
|
|
|
|
|
|
Set new count of currently used elements
|
|
Get buffer type as string
|
|
Get buffer type from string
|
|
Increase reference count |
|
Decrease reference count and garbage collect if 0 |
|
|
|
Real buffer |
|
Indices (m_uiNumAllocated+2 of them) |
|
Buffer type |
|
Current lock type held |
|
Dirty flag |
|
Number of allocated elements |
|
Number of currently used elements |
|
Buffer upload policy |