kanzi::Buffer Class Reference

GPU memory buffer, for vertex or index data. More...

#include <kanzi/core.ui/platform/graphics_backend/gl/gpu_buffer_manager.hpp>

Public Types

enum  BufferType { BufferTypeVertex, BufferTypeIndex }
 Type enumeration of the buffer. More...
 

Public Member Functions

 Buffer ()
 Constructor. More...
 
 Buffer (Renderer *renderer, BufferType type, const void *data, unsigned int size)
 Constructor. More...
 
 ~Buffer ()
 Destructor. More...
 
BufferType getType () const
 Get buffer type. More...
 
unsigned int getNativeHandle () const
 Get buffer native handle. More...
 
unsigned int getDataOffset () const
 Get start offset of buffer data. More...
 
 Buffer (KZ_RV_REF(Buffer) other)
 
Bufferoperator= (KZ_RV_REF(Buffer) other)
 

Friends

void swap (Buffer &left, Buffer &right)
 

Detailed Description

GPU memory buffer, for vertex or index data.

Member Enumeration Documentation

Type enumeration of the buffer.

Enumerator
BufferTypeVertex 

Vertex buffer.

BufferTypeIndex 

Index buffer.

Constructor & Destructor Documentation

kanzi::Buffer::Buffer ( )
explicit

Constructor.

kanzi::Buffer::Buffer ( Renderer renderer,
BufferType  type,
const void *  data,
unsigned int  size 
)
explicit

Constructor.

kanzi::Buffer::~Buffer ( )

Destructor.

kanzi::Buffer::Buffer ( KZ_RV_REF(Buffer other)
inline

Member Function Documentation

BufferType kanzi::Buffer::getType ( ) const

Get buffer type.

unsigned int kanzi::Buffer::getNativeHandle ( ) const

Get buffer native handle.

unsigned int kanzi::Buffer::getDataOffset ( ) const

Get start offset of buffer data.

Buffer& kanzi::Buffer::operator= ( KZ_RV_REF(Buffer other)
inline

Friends And Related Function Documentation

void swap ( Buffer left,
Buffer right 
)
friend

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