My Project
Public Member Functions | List of all members
ParaEngine::ParaIndexBuffer Class Reference

in OpenGL, there is no different between vertex and index buffer. More...

#include <ParaVertexBuffer.h>

Inheritance diagram for ParaEngine::ParaIndexBuffer:
ParaEngine::ParaVertexBuffer

Public Member Functions

bool CreateBuffer (uint32 nBufferSize, DWORD dwFormat=0, DWORD dwUsage=0)
 
IndexBufferDevicePtr_type GetDevicePointer ()
 
- Public Member Functions inherited from ParaEngine::ParaVertexBuffer
VertexBufferDevicePtr_type GetDevicePointer ()
 
IndexBufferDevicePtr_type GetDevicePointerAsIndexBuffer ()
 
char * GetMemoryPointer ()
 
bool CreateBuffer (uint32 nBufferSize, DWORD dwFormat=0, DWORD dwUsage=0, D3DPOOL dwPool=D3DPOOL_MANAGED)
 recreate the buffer based on the new size More...
 
bool CreateIndexBuffer (uint32 nBufferSize, DWORD dwFormat=0, DWORD dwUsage=0)
 
bool CreateMemoryBuffer (uint32 nBufferSize, DWORD dwFormat=0, DWORD dwUsage=0)
 
void ReleaseBuffer ()
 release the buffer. More...
 
bool Lock (void **ppData, uint32 offsetToLock=0, uint32 sizeToLock=0, DWORD dwFlag=0)
 lock and return a writable buffer into which one can fill the buffer. More...
 
void Unlock ()
 unlock the buffer
 
uint32 GetBufferSize ()
 get the current buffer size. More...
 
bool IsValid () const
 boolean: test validity
 
 operator bool () const
 
bool operator! () const
 
void RendererRecreated ()
 
void UploadMemoryBuffer (const char *pBuffer, int32 nBufSize=-1)
 

Additional Inherited Members

- Public Types inherited from ParaEngine::ParaVertexBuffer
enum  EnumBufferType { BufferType_VertexBuffer = 0, BufferType_IndexBuffer, BufferType_MemoryBuffer }
 
- Protected Attributes inherited from ParaEngine::ParaVertexBuffer
union {
   IndexBufferDevicePtr_type   m_indexBuffer
 
   VertexBufferDevicePtr_type   m_vertexBuffer
 
}; 
 
uint32 m_nBufferSize
 
char * m_buffer
 
EnumBufferType m_bufferType
 

Detailed Description

in OpenGL, there is no different between vertex and index buffer.

in directX, vertex and index buffer has similar interface, but different interface type. so here we just wrap around ParaVertexBuffer.


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