API Documentation
Loading...
Searching...
No Matches
OpenGLBuffer Class Reference

Buffer for storing data in the OpenGL engine, usually for rendering. More...

#include <GLBuffer.h>

Inheritance diagram for OpenGLBuffer:
[legend]
Collaboration diagram for OpenGLBuffer:
[legend]

Public Member Functions

void bind ()
 
GLuint bindLocation () const
 
GLuint bufferID () const
 
void cleanup () final override
 
void copyData (const TableColumn &reference_data, bool set_type) final override
 
GLuint getFormat () const
 
GLuint getFormat (uint01) const
 
void getFromVideoCard (bool) final override
 
void insertRows (uint04, uint04) final override
 
void * mapMemory (size_t offset, size_t size) const final override
 
 OpenGLBuffer (const String &label, const DynamicPointer< GLESGraphicsDevice > &device)
 
 OpenGLBuffer (const TableColumn &reference_data, const DynamicPointer< GLESGraphicsDevice > &device)
 
 OpenGLBuffer (OpenGLBuffer &&other) noexcept
 
void release ()
 
void sendToVideoCard (bool) final override
 
void setAttribute (GLint attribute, uint04 offset=0, uint04 stride=Constant< uint04 >::Invalid)
 
void setRawAttribute (GLint attribute, uint04 vector_size, GLuint format, GLsizei stride, size_t offset)
 
void setSize (uint04 buffer_size) final override
 
void setUniformAttribute (const GLESShader &shader, const char *location)
 
uint04 typeStride () const
 
void unmapMemory () const final override
 
void updateRegion (const TableColumn &reference_data, uint04 offset, uint04 size) final override
 
GLint vectorSize () const
 
 ~OpenGLBuffer ()
 
- Public Member Functions inherited from GraphicsBuffer
const void * begin () const final
 
void * begin () final
 
bool beginsWith (uint04 index, const char *value, bool ignore_case) const override
 
bool beginsWith (uint04 index, const String &value, bool ignore_case) const override
 
uint04 capacity ()
 
virtual void compress (BinaryCompressionObject &object) override
 
bool contains (uint04 index, const char *value, bool ignore_case) const override
 
bool contains (uint04 index, const String &value, bool ignore_case) const override
 
virtual void copyRow (uint04 source, uint04 destination) override
 
virtual void copyRows (uint04 source, uint04 destination, uint04 size) override
 
const void * end () const final
 
void * end () final
 
void get (uint04 index, bool &value) const final override
 
void get (uint04 index, fltp04 &value) const final override
 
void get (uint04 index, fltp08 &value) const final override
 
void get (uint04 index, RGBColor &value) const final override
 
void get (uint04 index, sint01 &value) const final override
 
void get (uint04 index, sint02 &value) const final override
 
void get (uint04 index, sint04 &value) const final override
 
void get (uint04 index, sint08 &value) const final override
 
void get (uint04 index, String &value) const final override
 
void get (uint04 index, uint01 &value) const final override
 
void get (uint04 index, uint02 &value) const final override
 
void get (uint04 index, uint04 &value) const final override
 
void get (uint04 index, uint04 vector_pos, bool &value) const final override
 
void get (uint04 index, uint04 vector_pos, fltp04 &value) const final override
 
void get (uint04 index, uint04 vector_pos, fltp08 &value) const final override
 
void get (uint04 index, uint04 vector_pos, sint01 &value) const final override
 
void get (uint04 index, uint04 vector_pos, sint02 &value) const final override
 
void get (uint04 index, uint04 vector_pos, sint04 &value) const final override
 
void get (uint04 index, uint04 vector_pos, sint08 &value) const final override
 
void get (uint04 index, uint04 vector_pos, String &value) const final override
 
void get (uint04 index, uint04 vector_pos, uint01 &value) const final override
 
void get (uint04 index, uint04 vector_pos, uint02 &value) const final override
 
void get (uint04 index, uint04 vector_pos, uint04 &value) const final override
 
void get (uint04 index, uint04 vector_pos, uint08 &value) const final override
 
void get (uint04 index, uint08 &value) const final override
 
template<class t_type_a >
void get (void *memory, String &value)
 
template<class t_type_a , class t_type_b >
void get (void *memory, t_type_b &value)
 
template<class t_type >
void getMemory (uint04 index, t_type &value) const
 
template<class t_type >
void getMemory (uint04 index, uint04 vector_pos, t_type &value) const
 
virtual TableColumngetSelected (const Buffer< bool > &) const override
 
 GraphicsBuffer (const String &label)
 
 GraphicsBuffer (GraphicsBuffer &&buffer) noexcept
 
void insert (uint04 index) override final
 
virtual void insertIndices (uint04 location, uint04 size) override
 
bool isAccessable () const
 
bool isSame (uint04 index, const char *value) const override
 
bool isSame (uint04 index, const String &value) const override
 
virtual void mapFromFile (BinaryFile &file, uint08 version_number) override
 
virtual void mapToFile (BinaryFile &file, BinaryCompressionObject &object) override
 
virtual void mapToFile (BinaryFile &file, int compression) override
 
template<class t_type_a , class t_type_b >
void move (t_type_b &value, void *memory) const
 
template<class t_type_a >
void move (void *memory, const String &value) const
 
template<class t_type_a , class t_type_b >
void move (void *memory, const t_type_b &value) const
 
void removeIndices (const Buffer< uint04 > &offset_lookup_list) override final
 
virtual void removeIndices (uint04 location, uint04 size) override
 
void removeRow (uint04 index) override final
 
void removeRows (const Buffer< uint04 > &indices) override final
 
void removeRows (uint04 index, uint04 size) override final
 
void removeRows (uint04 offset, const Buffer< bool > &indices) override
 
void set (uint04 index, bool value) final override
 
void set (uint04 index, const String &value) final override
 
void set (uint04 index, fltp04 value) final override
 
void set (uint04 index, fltp08 value) final override
 
void set (uint04 index, RGBColor value) final override
 
void set (uint04 index, sint01 value) final override
 
void set (uint04 index, sint02 value) final override
 
void set (uint04 index, sint04 value) final override
 
void set (uint04 index, sint08 value) final override
 
void set (uint04 index, uint01 value) final override
 
void set (uint04 index, uint02 value) final override
 
void set (uint04 index, uint04 value) final override
 
void set (uint04 index, uint04 vector_pos, bool value) final override
 
void set (uint04 index, uint04 vector_pos, const String &value) final override
 
void set (uint04 index, uint04 vector_pos, fltp04 value) final override
 
void set (uint04 index, uint04 vector_pos, fltp08 value) final override
 
void set (uint04 index, uint04 vector_pos, sint01 value) final override
 
void set (uint04 index, uint04 vector_pos, sint02 value) final override
 
void set (uint04 index, uint04 vector_pos, sint04 value) final override
 
void set (uint04 index, uint04 vector_pos, sint08 value) final override
 
void set (uint04 index, uint04 vector_pos, uint01 value) final override
 
void set (uint04 index, uint04 vector_pos, uint02 value) final override
 
void set (uint04 index, uint04 vector_pos, uint04 value) final override
 
void set (uint04 index, uint04 vector_pos, uint08 value) final override
 
void set (uint04 index, uint08 value) final override
 
virtual void setAccessable (bool is_accessable, bool copy_existing)
 
template<class t_type >
void setData (const t_type *begin, const t_type *end, bool set_type)
 
template<class t_type >
void setMemory (const t_type *data_to_insert, uint04 offset, uint04 size)
 
template<class t_type >
void setMemory (uint04 index, const t_type &value)
 
template<class t_type >
void setMemory (uint04 index, uint04 vector_pos, const t_type &value)
 
template<class t_type >
void setMemory (void *temp_value, const t_type &value)
 
template<class t_type >
void setRawMemory (uint04 index, const t_type &value)
 
void setType (const TypeInfo &type)
 
void setUsage (Type type)
 
uint04 size () const final override
 
virtual void updateFrom (const TableColumn &column) override
 
- Public Member Functions inherited from TableColumn
virtual void addRow ()
 
const Buffer< TableChange > & changes () const
 
Buffer< TableChangechangesSince (const Time &time) const
 
Buffer< TableChangechangesSince (const Time &time, const Bounds< 1, uint04 > &range) const
 
void clearUpdates ()
 
virtual void compressIfNeeded (BinaryCompressionObject &object)
 
BinaryCompressionObjectcompressionObject ()
 
bool compressionValid () const
 
template<class t_class >
t_class get (uint04 index) const
 
void get (uint04 index, BitFlag &bitflag) const
 
template<uint01 t_dims, class t_type >
void get (uint04 index, Bounds< t_dims, t_type > &bounds) const
 
void get (uint04 index, File &file) const
 
virtual void get (uint04 index, Matrix< fltp04 > &transform) const
 
virtual void get (uint04 index, Matrix< fltp08 > &transform) const
 
template<class t_type , uint01 t_col, uint01 t_row>
void get (uint04 index, Matrix< t_type, t_col, t_row > &matrix) const
 
template<class t_class >
std::enable_if< ObjectInfo< t_class >::Enum >::type get (uint04 index, t_class &enum_value) const
 
template<class t_class >
std::enable_if< IsVec< t_class >::value &&t_class::NumberOfDimensions()!=1 >::type get (uint04 index, t_class &vector) const
 
void get (uint04 index, Time &time) const
 
void get (uint04 index, TranslatedString &string) const
 
template<uint01 t_dims, class t_type >
void get (uint04 index, Triangle< t_dims, t_type > &tri) const
 
template<class t_class >
t_class get (uint04 index, uint04 sub_index) const
 
virtual void get (uint04 index, UUID &vector) const
 
template<class t_class >
void get (uint04 index, Vector< 1, t_class > &vector) const
 
void get (uint04 index, Vector< 32, bool > &value) const
 
template<class t_type >
Buffer< t_type > getAll (uint04 start, uint04 size) const
 
template<class t_type >
t_type getDefaultValue () const
 
template<class t_type >
uint04 getIndexOf (const t_type &object) const
 
virtual uint04 getRowSize (uint04) const
 
virtual void getVector (uint04 index, Vector< 1, uint04 > &vector) const
 
virtual void getVector (uint04 index, Vector< 2, uint04 > &vector) const
 
virtual void getVector (uint04 index, Vector< 3, fltp04 > &vector) const
 
virtual void getVector (uint04 index, Vector< 3, fltp08 > &vector) const
 
virtual void getVector (uint04 index, Vector< 3, uint04 > &vector) const
 
template<uint01 t_dims, class t_type >
void getVector (uint04 index, Vector< t_dims, t_type > &value) const
 
bool hasChangesSince (const Time &time, const Bounds< 1, uint04 > &range) const
 
template<class t_type >
void insert (uint04 index, const t_type &value)
 
const Stringlabel () const
 
Time modifiedTime () const
 
template<class t_type >
void set (t_type *values, uint04 start_index, uint04 size)
 
void set (uint04 index, const BitFlag &bitflag)
 
template<uint01 t_dims, class t_type >
void set (uint04 index, const Bounds< t_dims, t_type > &value)
 
virtual void set (uint04 index, const Matrix< fltp04 > &transform)
 
virtual void set (uint04 index, const Matrix< fltp08 > &transform)
 
template<class t_type , uint01 t_col, uint01 t_row>
void set (uint04 index, const Matrix< t_type, t_col, t_row > &matrix)
 
template<class t_class >
std::enable_if< IsVec< t_class >::value >::type set (uint04 index, const t_class &value)
 
template<class t_class >
std::enable_if< ObjectInfo< t_class >::Enum >::type set (uint04 index, const t_class &value)
 
template<class t_class >
std::enable_if<!ObjectInfo< t_class >::Enum &&!IsVec< t_class >::value >::type set (uint04 index, const t_class &value)
 
void set (uint04 index, const Time &time)
 
template<uint01 t_dims, class t_type >
void set (uint04 index, const Triangle< t_dims, t_type > &value)
 
virtual void set (uint04 index, const UUID &value)
 
void set (uint04 index, const Vector< 32, bool > &value)
 
virtual void setAll (uint04 to_location, uint04 from_location, uint04 size, const TableColumn &from_column)
 
template<class t_type >
void setAll (uint04 to_location, uint04 from_location, uint04 size, const TableColumn &from_column)
 
void setCompressionMode (CompressionMode compression_mode)
 
template<class t_type >
void setDefaultValue (const t_type &value)
 
void setLabel (const String &label)
 
virtual void setRowSize (uint04, uint04)
 
template<uint01 t_dims, class t_type >
void setVector (uint04 index, const Vector< t_dims, t_type > &value)
 
 TableColumn (const String &label)
 
 TableColumn (const String &label, const TypeInfo type)
 
virtual TypeInfo type () const
 
void update (const TableChange &change)
 
void updateAll ()
 
void updateCompressionInfo (BinaryCompressionObject &object)
 
virtual ~TableColumn ()
 

Additional Inherited Members

- Public Types inherited from GraphicsBuffer
enum  Type { VERTEX , UNIFORM , INDEX , INSTANCE }
 
- Protected Member Functions inherited from GraphicsBuffer
template<class t_type >
void getData (t_type *data_to_get, uint04 offset, uint04 size)
 
- Protected Attributes inherited from GraphicsBuffer
uint04 m_allocated_size
 
Type m_internal_type
 
bool m_is_accessable
 
bool m_is_memory_owner
 
bool m_is_normalized
 
uint04 m_size
 
- Protected Attributes inherited from TableColumn
Buffer< TableChangem_changes
 
uint08 m_compression_hash
 
CompressionMode m_compression_mode = CompressionMode::e_default_compression
 
BinaryCompressionObject m_compression_object
 
bool m_compression_valid
 
String m_label
 
Time m_modified_time
 
TypeInfo m_type
 

Detailed Description

Buffer for storing data in the OpenGL engine, usually for rendering.


Constructor & Destructor Documentation

◆ OpenGLBuffer() [1/3]

OpenGLBuffer ( const String & label,
const DynamicPointer< GLESGraphicsDevice > & device )
inline

◆ OpenGLBuffer() [2/3]

OpenGLBuffer ( const TableColumn & reference_data,
const DynamicPointer< GLESGraphicsDevice > & device )
inline

◆ OpenGLBuffer() [3/3]

OpenGLBuffer ( OpenGLBuffer && other)
inlinenoexcept

◆ ~OpenGLBuffer()

~OpenGLBuffer ( )
inline

Member Function Documentation

◆ bind()

void bind ( )
inline

◆ bindLocation()

GLuint bindLocation ( ) const
inline

◆ bufferID()

GLuint bufferID ( ) const
inline

◆ cleanup()

void cleanup ( )
inlinefinaloverridevirtual

Implements GraphicsBuffer.

◆ copyData()

void copyData ( const TableColumn & reference_data,
bool set_type )
inlinefinaloverridevirtual

Implements GraphicsBuffer.

◆ getFormat() [1/2]

GLuint getFormat ( ) const
inline

◆ getFormat() [2/2]

GLuint getFormat ( uint01 ) const
inline

◆ getFromVideoCard()

void getFromVideoCard ( bool )
inlinefinaloverridevirtual

Implements GraphicsBuffer.

◆ insertRows()

void insertRows ( uint04 ,
uint04  )
inlinefinaloverridevirtual

Implements TableColumn.

◆ mapMemory()

void * mapMemory ( size_t offset,
size_t size ) const
inlinefinaloverridevirtual

Implements GraphicsBuffer.

◆ release()

void release ( )
inline

◆ sendToVideoCard()

void sendToVideoCard ( bool )
inlinefinaloverridevirtual

Implements GraphicsBuffer.

◆ setAttribute()

void setAttribute ( GLint attribute,
uint04 offset = 0,
uint04 stride = Constant<uint04>::Invalid )
inline

◆ setRawAttribute()

void setRawAttribute ( GLint attribute,
uint04 vector_size,
GLuint format,
GLsizei stride,
size_t offset )
inline

◆ setSize()

void setSize ( uint04 buffer_size)
inlinefinaloverridevirtual

Implements TableColumn.

◆ setUniformAttribute()

void setUniformAttribute ( const GLESShader & shader,
const char * location )
inline

◆ typeStride()

uint04 typeStride ( ) const
inline

◆ unmapMemory()

void unmapMemory ( ) const
inlinefinaloverridevirtual

Implements GraphicsBuffer.

◆ updateRegion()

void updateRegion ( const TableColumn & reference_data,
uint04 offset,
uint04 size )
inlinefinaloverridevirtual

Implements GraphicsBuffer.

◆ vectorSize()

GLint vectorSize ( ) const
inline

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