Castor3D  ..
Public Member Functions | List of all members
Castor3D::IndexBuffer Class Reference

Index buffer representation. More...

+ Inheritance diagram for Castor3D::IndexBuffer:
+ Collaboration diagram for Castor3D::IndexBuffer:

Public Member Functions

C3D_API IndexBuffer (Engine &p_engine)
 Constructor. More...
 
C3D_API ~IndexBuffer ()
 Destructor. More...
 
C3D_API bool Create ()
 Creation function. More...
 
- Public Member Functions inherited from Castor3D::CpuBuffer< uint32_t >
void Destroy ()
 Destruction function. More...
 
void Cleanup ()
 Cleanup function. More...
 
bool Initialise (eBUFFER_ACCESS_TYPE p_type, eBUFFER_ACCESS_NATURE p_nature)
 Initialisation function, initialises GPU buffer. More...
 
uint32_t * Lock (uint32_t p_offset, uint32_t p_count, uint32_t p_flags)
 Locks the buffer, id est maps it into memory so we can modify it. More...
 
void Unlock ()
 Unlocks the buffer, id est unmaps it from memory so no modification can be made after that. More...
 
bool Fill (uint32_t const *p_buffer, ptrdiff_t p_size, Castor3D::eBUFFER_ACCESS_TYPE p_type, Castor3D::eBUFFER_ACCESS_NATURE p_nature)
 Transmits data to the GPU buffer from RAM. More...
 
bool Bind ()
 Activation function, to tell the GPU it is active. More...
 
void Unbind ()
 Deactivation function, to tell the GPU it is inactive. More...
 
void SetElement (uint32_t p_index, uint32_t const &p_value)
 Sets element value at given index. More...
 
void AddElement (uint32_t const &p_value)
 Adds a value at the end of the buffer. More...
 
uint32_t GetSize () const
 Retrieves the filled buffer size. More...
 
uint32_t GetCapacity () const
 Retrieves the allocated buffer size. More...
 
void Resize (uint32_t p_uiNewSize)
 Sets the allocated size of the buffer. More...
 
void Reserve (uint32_t p_uiIncrement)
 Increases the allocated size of the buffer. More...
 
void Clear ()
 Clears the buffer. More...
 
bool IsToDelete () const
 Retrieves the delete status of the buffer. More...
 
bool IsAssigned () const
 Retrieves the assignment status of the buffer. More...
 
GpuBufferSPtr GetGpuBuffer () const
 Retrieves the GPU buffer. More...
 
void Assign ()
 Sets the assignment status to true. More...
 
void Unassign ()
 Sets the assignment status to false. More...
 
uint32_t const * data () const
 Retrieves the data pointer. More...
 
uint32_t * data ()
 Retrieves the data pointer. More...
 

Additional Inherited Members

- Protected Types inherited from Castor3D::CpuBuffer< uint32_t >
typedef std::shared_ptr< GpuBuffer< uint32_t > > GpuBufferSPtr
 
typedef std::weak_ptr< GpuBuffer< uint32_t > > GpuBufferWPtr
 
typedef std::weak_ptr< CpuBuffer< uint32_t > > CpuBufferWPtr
 
- Protected Member Functions inherited from Castor3D::CpuBuffer< uint32_t >
 DECLARE_TPL_VECTOR (uint32_t, uint32_t)
 
 CpuBuffer (Engine &p_engine)
 Constructor. More...
 
 ~CpuBuffer ()
 Destructor. More...
 
- Protected Attributes inherited from Castor3D::CpuBuffer< uint32_t >
bool m_bToDelete
 Tells the buffer is to be deleted at next render loop. More...
 
bool m_bAssigned
 Tells the buffer has it's GPU buffer assigned. More...
 
GpuBufferSPtr m_pBuffer
 The GPU buffer. More...
 
TArray m_arrayData
 The buffer data. More...
 
uint32_t m_uiSavedSize
 

Detailed Description

Index buffer representation.

Author
Sylvain DOREMUS
Version
0.1
Date
09/02/2010
Remarks
Holds the index of the submesh vertices

Constructor & Destructor Documentation

◆ IndexBuffer()

C3D_API Castor3D::IndexBuffer::IndexBuffer ( Engine p_engine)

Constructor.

Parameters
[in]p_engineThe engine

◆ ~IndexBuffer()

C3D_API Castor3D::IndexBuffer::~IndexBuffer ( )

Destructor.

Member Function Documentation

◆ Create()

C3D_API bool Castor3D::IndexBuffer::Create ( )

Creation function.

Returns
true if OK

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