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

#include <GLBuffer.h>

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

Public Member Functions

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

Additional Inherited Members

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

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>::NaN )
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: