![]() |
NDEVR
API Documentation
|
Buffer for storing data in the OpenGL engine, usually for rendering. More...
Public Member Functions | |
| OpenGLBuffer (const StringView &label, const DynamicPointer< GLESGraphicsDevice > &device) | |
| Constructs an empty OpenGLBuffer with the given label. | |
| OpenGLBuffer (const TableColumn &reference_data, const DynamicPointer< GLESGraphicsDevice > &device) | |
| Constructs an OpenGLBuffer and copies data from a TableColumn. | |
| OpenGLBuffer (OpenGLBuffer &&other) noexcept | |
| Move constructor. | |
| ~OpenGLBuffer () | |
| Destructor. | |
| void | bind () |
| Binds the entire buffer to its target binding point. | |
| void | bind (uint04 offset, uint04 size) |
| Binds a sub-range of the buffer to its target binding point. | |
| GLuint | bindLocation () const |
| Returns the OpenGL binding target for this buffer type. | |
| GLuint | bufferID () const |
| Returns the OpenGL buffer object ID. | |
| void | cleanup () final override |
| Deletes the GPU buffer and resets internal state. | |
| void | copyData (const TableColumn &reference_data, bool set_type) final override |
| Copies all data from a TableColumn into this buffer. | |
| GLuint | getFormat () const |
| Returns the OpenGL data type enum for the buffer. | |
| GLuint | getFormat (uint01) const |
| Returns the OpenGL data type enum for the buffer's element type. | |
| void | getFromVideoCard (bool) final override |
| Prepares the buffer for CPU read-back by allocating a temp buffer. | |
| void | insertRows (uint04, uint04) final override |
| Inserts rows into the buffer. | |
| void * | mapMemory (size_t offset, size_t size) const final override |
| Maps a region of the buffer into CPU-accessible memory. | |
| void | release () |
| Unbinds this buffer from its target binding point. | |
| void | sendToVideoCard (bool) final override |
| Uploads the temp buffer data to the GPU. | |
| void | setAttribute (GLint attribute, uint04 offset=0, uint04 stride=Constant< uint04 >::Invalid) |
| Sets a vertex attribute pointer for the entire buffer. | |
| void | setAttributeRange (GLint attribute, uint04 buffer_start, uint04 buffer_size, uint04 offset=0, uint04 stride=Constant< uint04 >::Invalid) |
| Sets a vertex attribute pointer for a sub-range of the buffer. | |
| virtual void | setDefaultValueFrom (const TableColumn &) override |
| No-op for OpenGL buffers. | |
| void | setRawAttribute (GLint attribute, uint04 vector_size, GLuint format, GLsizei stride, size_t offset) |
| Sets a raw vertex attribute pointer with explicit format parameters. | |
| void | setSize (uint04 buffer_size) final override |
| Resizes the buffer to hold the specified number of elements. | |
| uint04 | typeStride () const |
| Returns the byte stride per element component. | |
| void | unmapMemory (size_t, size_t) const final override |
| Unmaps previously mapped buffer memory. | |
| void | updateRegion (const TableColumn &reference_data, uint04 offset, uint04 size) final override |
| Updates a sub-region of the buffer from a TableColumn. | |
| GLint | vectorSize () const |
| Returns the number of components per vertex attribute. | |
| Public Member Functions inherited from GraphicsBuffer | |
| GraphicsBuffer (const StringView &label) | |
| Constructs a graphics buffer with the given label. | |
| GraphicsBuffer (GraphicsBuffer &&buffer) noexcept | |
| Move constructor. | |
| const void * | begin () const final |
| Returns a const pointer to the beginning of the underlying raw data. | |
| void * | begin () final |
| Returns a mutable pointer to the beginning of the underlying raw data. | |
| bool | beginsWith (uint04 index, const StringView &value, bool ignore_case) const override |
| Checks whether the stored string at the given row begins with the given prefix. | |
| uint08 | capacity () |
| Returns the allocated capacity of this buffer. | |
| virtual void | compress (BinaryCompressionObject &object) override |
| Compresses the column data into the given compression object. | |
| bool | contains (uint04 index, const StringView &value, bool ignore_case) const override |
| Checks whether the stored string at the given row contains the given substring. | |
| virtual void | copyRow (uint04 source, uint04 destination) override |
| Copies the value from one row to another within this column. | |
| virtual void | copyRows (uint04 source, uint04 destination, uint04 size) override |
| Copies a contiguous block of rows from one location to another within this column. | |
| const void * | end () const final |
| Returns a const pointer to one past the end of the underlying raw data. | |
| void * | end () final |
| Returns a mutable pointer to one past the end of the underlying raw data. | |
| void | get (uint04 index, bool &value) const final override |
| Retrieves a bool value at the given row index. | |
| void | get (uint04 index, fltp04 &value) const final override |
| Retrieves a fltp04 value at the given row index. | |
| void | get (uint04 index, fltp08 &value) const final override |
| Retrieves a fltp08 value at the given row index. | |
| void | get (uint04 index, RGBColor &value) const final override |
| Retrieves an RGBColor value at the given row index. | |
| void | get (uint04 index, sint01 &value) const final override |
| Retrieves a sint01 value at the given row index. | |
| void | get (uint04 index, sint02 &value) const final override |
| Retrieves a sint02 value at the given row index. | |
| void | get (uint04 index, sint04 &value) const final override |
| Retrieves a sint04 value at the given row index. | |
| void | get (uint04 index, sint08 &value) const final override |
| Retrieves a sint08 value at the given row index. | |
| void | get (uint04 index, uint01 &value) const final override |
| Retrieves a uint01 value at the given row index. | |
| void | get (uint04 index, uint02 &value) const final override |
| Retrieves a uint02 value at the given row index. | |
| void | get (uint04 index, uint04 &value) const final override |
| Retrieves a uint04 value at the given row index. | |
| void | get (uint04 index, uint04 vector_pos, bool &value) const final override |
| Retrieves a bool value at a specific vector position within a row. | |
| void | get (uint04 index, uint04 vector_pos, fltp04 &value) const final override |
| Retrieves a fltp04 value at a specific vector position within a row. | |
| void | get (uint04 index, uint04 vector_pos, fltp08 &value) const final override |
| Retrieves a fltp08 value at a specific vector position within a row. | |
| void | get (uint04 index, uint04 vector_pos, sint01 &value) const final override |
| Retrieves a sint01 value at a specific vector position within a row. | |
| void | get (uint04 index, uint04 vector_pos, sint02 &value) const final override |
| Retrieves a sint02 value at a specific vector position within a row. | |
| void | get (uint04 index, uint04 vector_pos, sint04 &value) const final override |
| Retrieves a sint04 value at a specific vector position within a row. | |
| void | get (uint04 index, uint04 vector_pos, sint08 &value) const final override |
| Retrieves a sint08 value at a specific vector position within a row. | |
| void | get (uint04 index, uint04 vector_pos, uint01 &value) const final override |
| Retrieves a uint01 value at a specific vector position within a row. | |
| void | get (uint04 index, uint04 vector_pos, uint02 &value) const final override |
| Retrieves a uint02 value at a specific vector position within a row. | |
| void | get (uint04 index, uint04 vector_pos, uint04 &value) const final override |
| Retrieves a uint04 value at a specific vector position within a row. | |
| void | get (uint04 index, uint04 vector_pos, uint08 &value) const final override |
| Retrieves a uint08 value at a specific vector position within a row. | |
| void | get (uint04 index, uint08 &value) const final override |
| Retrieves a uint08 value at the given row index. | |
| void | get (uint04, StringAllocatingView &) const final override |
| Retrieves a string value at the given row index as a StringAllocatingView. | |
| void | get (uint04, StringView &) const final override |
| Retrieves a string value at the given row index as a StringView. | |
| void | get (uint04, uint04, StringAllocatingView &) const final override |
| Retrieves a string value at a specific vector position within a row. | |
| const StringAllocatingView | getDefaultValue () const override |
| Returns the default value for new rows as a string representation. | |
| virtual TableColumn * | getSelected (const Buffer< bool > &) const override |
| Creates a new TableColumn containing only the rows where the corresponding selected_indices entry is true. | |
| void | insert (uint04 index) override final |
| Inserts a default-initialized row at the given index, shifting subsequent rows. | |
| virtual void | insertIndices (uint04 location, uint04 size) override |
| Inserts a contiguous block of index entries at the given location. | |
| bool | isAccessable () const |
| Checks whether the buffer is currently CPU-accessible. | |
| bool | isSame (uint04 index, const StringView &value) const override |
| Checks whether the stored string at the given row is exactly equal to the given value. | |
| virtual void | mapFromFile (BinaryFileTableInfo &file) override |
| Maps this column from a binary file for deserialization. | |
| virtual void | mapToFile (BinaryFileTableInfo &file, BinaryCompressionObject &object) override |
| Maps this column to a binary file using compression. | |
| virtual void | mapToFile (BinaryFileTableInfo &file, int compression) override |
| Maps this column to a binary file for serialization. | |
| void | removeIndices (const Buffer< uint04 > &offset_lookup_list) override final |
| Removes index entries using an offset lookup list. | |
| virtual void | removeIndices (uint04 location, uint04 size) override |
| Removes a contiguous block of index entries at the given location. | |
| void | removeRow (uint04 index) override final |
| Removes a single row at the given index. | |
| void | removeRows (const Buffer< uint04 > &indices) override final |
| Removes multiple rows identified by a sorted list of indices. | |
| void | removeRows (uint04 index, uint04 size) override final |
| Removes a contiguous block of rows starting at the given index. | |
| void | removeRows (uint04 offset, const Buffer< bool > &indices) override |
| Removes rows indicated by a boolean mask starting from a given offset. | |
| void | set (uint04 index, bool value) final override |
| Sets a bool value at the given row index. | |
| void | set (uint04 index, fltp04 value) final override |
| Sets a fltp04 value at the given row index. | |
| void | set (uint04 index, fltp08 value) final override |
| Sets a fltp08 value at the given row index. | |
| void | set (uint04 index, RGBColor value) final override |
| Sets an RGBColor value at the given row index. | |
| void | set (uint04 index, sint01 value) final override |
| Sets a sint01 value at the given row index. | |
| void | set (uint04 index, sint02 value) final override |
| Sets a sint02 value at the given row index. | |
| void | set (uint04 index, sint04 value) final override |
| Sets a sint04 value at the given row index. | |
| void | set (uint04 index, sint08 value) final override |
| Sets a sint08 value at the given row index. | |
| void | set (uint04 index, uint01 value) final override |
| Sets a uint01 value at the given row index. | |
| void | set (uint04 index, uint02 value) final override |
| Sets a uint02 value at the given row index. | |
| void | set (uint04 index, uint04 value) final override |
| Sets a uint04 value at the given row index. | |
| void | set (uint04 index, uint04 vector_pos, bool value) final override |
| Sets a bool value at a specific vector position within a row. | |
| void | set (uint04 index, uint04 vector_pos, fltp04 value) final override |
| Sets a fltp04 value at a specific vector position within a row. | |
| void | set (uint04 index, uint04 vector_pos, fltp08 value) final override |
| Sets a fltp08 value at a specific vector position within a row. | |
| void | set (uint04 index, uint04 vector_pos, sint01 value) final override |
| Sets a sint01 value at a specific vector position within a row. | |
| void | set (uint04 index, uint04 vector_pos, sint02 value) final override |
| Sets a sint02 value at a specific vector position within a row. | |
| void | set (uint04 index, uint04 vector_pos, sint04 value) final override |
| Sets a sint04 value at a specific vector position within a row. | |
| void | set (uint04 index, uint04 vector_pos, sint08 value) final override |
| Sets a sint08 value at a specific vector position within a row. | |
| void | set (uint04 index, uint04 vector_pos, uint01 value) final override |
| Sets a uint01 value at a specific vector position within a row. | |
| void | set (uint04 index, uint04 vector_pos, uint02 value) final override |
| Sets a uint02 value at a specific vector position within a row. | |
| void | set (uint04 index, uint04 vector_pos, uint04 value) final override |
| Sets a uint04 value at a specific vector position within a row. | |
| void | set (uint04 index, uint04 vector_pos, uint08 value) final override |
| Sets a uint08 value at a specific vector position within a row. | |
| void | set (uint04 index, uint08 value) final override |
| Sets a uint08 value at the given row index. | |
| void | set (uint04, const StringView &) final override |
| Sets a string value at the given row index. | |
| void | set (uint04, uint04, const StringView &) final override |
| Sets a string value at a specific vector position within a row. | |
| virtual void | setAccessable (bool is_accessable, bool copy_existing) |
| Sets whether the buffer is CPU-accessible. | |
| virtual void | setDefaultValue (const StringAllocatingView &) override |
| Sets the default value for new rows from a string representation. | |
| void | setType (const TypeInfo &type) |
| Sets the element type for this buffer. | |
| void | setUsage (Type type) |
| Sets the video card usage type for this buffer. | |
| uint04 | size () const final override |
| Returns the number of rows in this column. | |
| virtual void | swap (uint04 a, uint04 b) override |
| Swaps the values at two row indices. | |
| virtual void | swapIndices (uint04 a, uint04 b) override |
| Swaps two index entries. | |
| virtual TypeInfo | type () const override |
| Returns the type information for this buffer. | |
| virtual void | updateFrom (const TableColumn &column) override |
| Synchronizes this buffer from a source TableColumn. | |
| Public Member Functions inherited from TableColumn | |
| TableColumn (const StringView &label) | |
| Constructs a TableColumn with the given label. | |
| virtual | ~TableColumn () |
| Virtual destructor. | |
| virtual void | addRow () |
| Appends a single default-initialized row at the end of the column. | |
| const Buffer< TableChange > & | changes () const |
| Returns the list of all recorded changes for this column. | |
| Buffer< TableChange > | changesSince (const Time &time) const |
| Returns all changes recorded since the given time. | |
| Buffer< TableChange > | changesSince (const Time &time, const Bounds< 1, uint04 > &range) const |
| Returns all changes recorded since the given time within a specific row range. | |
| void | clearUpdates () |
| Clears all recorded changes and resets the modified time to zero. | |
| virtual void | finishMapFromFile (BinaryFileTableInfo &) |
| Completes any deferred work after mapping from a binary file. | |
| template<class t_class> | |
| t_class | get (uint04 index) const |
| Convenience template that returns a value by type from the given row index. | |
| void | get (uint04 index, BitFlag &bitflag) const |
| Retrieves a BitFlag value at the given row index. | |
| virtual void | get (uint04 index, Bounds< 3, fltp04 > &bounds) const |
| Retrieves a 3D fltp04 bounding box from the given row index. | |
| virtual void | get (uint04 index, Bounds< 3, fltp08 > &bounds) const |
| Retrieves a 3D fltp08 bounding box from the given row index. | |
| template<uint01 t_dims, class t_type> | |
| void | get (uint04 index, Bounds< t_dims, t_type > &bounds) const |
| Retrieves a Bounds value at the given row index by reading min and max components from contiguous vector positions. | |
| void | get (uint04 index, const String &value) const =delete |
| Deleted overload to prevent accidentally passing a const String by reference as an output parameter. | |
| void | get (uint04 index, File &file) const |
| Retrieves a File value at the given row index. | |
| virtual void | get (uint04 index, Matrix< fltp04 > &transform) const |
| Retrieves a 4x4 fltp04 matrix from the given row index. | |
| virtual void | get (uint04 index, Matrix< fltp08 > &transform) const |
| Retrieves a 4x4 fltp08 matrix from the given row index. | |
| template<class t_type, uint01 t_col, uint01 t_row> | |
| void | get (uint04 index, Matrix< t_type, t_col, t_row > &matrix) const |
| Retrieves a generic matrix from the given row index by reading each element from contiguous vector positions in column-major order. | |
| template<class t_class> | |
| std::enable_if< ObjectInfo< t_class >::Enum >::type | get (uint04 index, t_class &enum_value) const |
| Retrieves an enum value at the given row index by reading a stored uint04. | |
| template<class t_class> | |
| std::enable_if< IsVec< t_class >::value &&t_class::NumberOfDimensions()!=1 >::type | get (uint04 index, t_class &vector) const |
| Retrieves a multi-dimensional vector value at the given row index. | |
| template<class t_class> | |
| std::enable_if< std::is_pointer< t_class >::value >::type | get (uint04 index, t_class &vector) const |
| Retrieves a pointer value at the given row index by reading a stored uint08. | |
| void | get (uint04 index, Time &time) const |
| Retrieves a Time value at the given row index. | |
| void | get (uint04 index, TranslatedString &string) const |
| Retrieves a TranslatedString value at the given row index. | |
| template<uint01 t_dims, class t_type> | |
| void | get (uint04 index, Triangle< t_dims, t_type > &tri) const |
| Retrieves a Triangle value at the given row index by reading vertex components from contiguous vector positions. | |
| template<class t_class> | |
| t_class | get (uint04 index, uint04 sub_index) const |
| Convenience template that returns a value by type from a specific vector position within a row. | |
| virtual void | get (uint04 index, UUID &vector) const |
| Retrieves a UUID value at the given row index by reading 16 bytes. | |
| template<class t_class> | |
| void | get (uint04 index, Vector< 1, t_class > &vector) const |
| Retrieves a 1D vector value at the given row index by delegating to the scalar get. | |
| void | get (uint04 index, Vector< 32, bool > &value) const |
| Retrieves a 32-element boolean vector at the given row index by reading the stored uint04 and reinterpreting its bits. | |
| template<class t_type> | |
| Buffer< t_type > | getAll (uint04 start, uint04 size) const |
| Retrieves a contiguous range of values as a typed buffer. | |
| template<class t_type> | |
| uint04 | getIndexOf (const t_type &object) const |
| Searches for the first row containing the given value. | |
| Time | getModifiedTime () const |
| Returns the last modification time of this column. | |
| virtual uint04 | getRowSize (uint04) const |
| Returns the size of an array-typed row at the given index. | |
| virtual void | getVector (uint04 index, Vector< 1, uint04 > &vector) const |
| Retrieves a 1D uint04 vector from the given row index. | |
| virtual void | getVector (uint04 index, Vector< 2, uint04 > &vector) const |
| Retrieves a 2D uint04 vector from the given row index. | |
| virtual void | getVector (uint04 index, Vector< 3, fltp04 > &vector) const |
| Retrieves a 3D fltp04 vector from the given row index. | |
| virtual void | getVector (uint04 index, Vector< 3, fltp08 > &vector) const |
| Retrieves a 3D fltp08 vector from the given row index. | |
| virtual void | getVector (uint04 index, Vector< 3, uint04 > &vector) const |
| Retrieves a 3D uint04 vector from the given row index. | |
| template<uint01 t_dims, class t_type> | |
| void | getVector (uint04 index, Vector< t_dims, t_type > &value) const |
| Retrieves a generic vector from the given row index by reading each component from consecutive vector positions. | |
| bool | hasChangesSince (const Time &time, const Bounds< 1, uint04 > &range) const |
| Checks whether any changes have been recorded since the given time within a row range. | |
| template<class t_type> | |
| void | insert (uint04 index, const t_type &value) |
| Inserts a new row at the given index and immediately sets its value. | |
| const String & | label () const |
| Returns the label (name) of this column. | |
| UUID | referenceTable () const |
| Returns the UUID of a table that this column references, if any. | |
| virtual void | resetRow (uint04) |
| Resets a row to its default state. | |
| template<class t_type> | |
| void | set (t_type *values, uint04 start_index, uint04 size) |
| Bulk-sets values from a raw pointer array into this column. | |
| void | set (uint04 index, const BitFlag &bitflag) |
| Sets a BitFlag value at the given row index by storing its underlying bits. | |
| void | set (uint04 index, const BitReference &val) |
| Sets the value at the given row index from a BitReference. | |
| virtual void | set (uint04 index, const Bounds< 3, fltp04 > &bounds) |
| Sets a 3D fltp04 bounding box at the given row index. | |
| virtual void | set (uint04 index, const Bounds< 3, fltp08 > &bounds) |
| Sets a 3D fltp08 bounding box at the given row index. | |
| template<uint01 t_dims, class t_type> | |
| void | set (uint04 index, const Bounds< t_dims, t_type > &value) |
| Sets a Bounds value at the given row index by writing min and max components into contiguous vector positions. | |
| void | set (uint04 index, const char *string) |
| Sets the value at the given row index from a C-string pointer. | |
| template<std::size_t N> | |
| void | set (uint04 index, const char(&string)[N]) |
| Sets the value at the given row index from a string literal. | |
| void | set (uint04 index, const File &value) |
| Sets a File value at the given row index. | |
| virtual void | set (uint04 index, const Matrix< fltp04 > &transform) |
| Sets a 4x4 fltp04 matrix value at the given row index. | |
| virtual void | set (uint04 index, const Matrix< fltp08 > &transform) |
| Sets a 4x4 fltp08 matrix value at the given row index. | |
| template<class t_type, uint01 t_col, uint01 t_row> | |
| void | set (uint04 index, const Matrix< t_type, t_col, t_row > &matrix) |
| Sets a Matrix value at the given row index by writing each element column-major into contiguous vector positions. | |
| void | set (uint04 index, const std::nullptr_t &) |
| Sets the value at the given row index to zero (nullptr overload). | |
| void | set (uint04 index, const String &value) |
| Sets a String value at the given row index. | |
| void | set (uint04 index, const StringAllocatingView &string) |
| Sets the value at the given row index from a StringAllocatingView. | |
| template<class t_class> | |
| std::enable_if< ObjectInfo< t_class >::Enum >::type | set (uint04 index, const t_class &value) |
| Sets an enum value at the given row index by casting to uint04. | |
| template<class t_class> | |
| std::enable_if< IsVec< t_class >::value >::type | set (uint04 index, const t_class &value) |
| Sets a vector value at the given row index. | |
| template<class t_class> | |
| std::enable_if<!ObjectInfo< t_class >::Enum >::type | set (uint04 index, const t_class &value) |
| Sets the value at the given row index from a non-enum type. | |
| template<class t_pointer_type> | |
| void | set (uint04 index, const t_pointer_type *pointer) |
| Sets the value at the given row index from a const pointer, stored as uint08. | |
| void | set (uint04 index, const Time &time) |
| Sets a Time value at the given row index by storing its underlying uint08. | |
| void | set (uint04 index, const TranslatedString &value) |
| Sets a TranslatedString value at the given row index. | |
| template<uint01 t_dims, class t_type> | |
| void | set (uint04 index, const Triangle< t_dims, t_type > &value) |
| Sets a Triangle value at the given row index by writing each vertex component into contiguous vector positions. | |
| virtual void | set (uint04 index, const UUID &value) |
| Sets a UUID value at the given row index. | |
| void | set (uint04 index, const Vector< 32, bool > &value) |
| Sets a 32-element boolean vector at the given row index. | |
| template<class t_pointer_type> | |
| void | set (uint04 index, t_pointer_type *pointer) |
| Sets the value at the given row index from a non-const pointer, stored as uint08. | |
| template<class t_type> | |
| void | setAll (uint04 to_location, uint04 from_location, uint04 size, const TableColumn &from_column) |
| Copies a range of values from another column into this column using a specific type. | |
| virtual void | setAll (uint04 to_location, uint04 from_location, uint04 size, const TableColumn &from_column) |
| Copies a range of values from another column into this column. | |
| void | setCompressionMode (CompressionMode compression_mode) |
| Sets the compression mode used when serializing this column. | |
| template<class t_type> | |
| std::enable_if<!std::is_enum< t_type >::value >::type | setDefault (const t_type &value) |
| Sets the default value for new rows from a non-enum value. | |
| template<class t_type> | |
| std::enable_if< std::is_enum< t_type >::value >::type | setDefault (const t_type &value) |
| Sets the default value for new rows from an enum value by casting to uint04. | |
| void | setLabel (const StringView &label) |
| Sets the label (name) for this column. | |
| void | setReferenceTable (const UUID table) |
| Sets the UUID of a table that this column references. | |
| virtual void | setRowSize (uint04, uint04) |
| Sets the size of an array-typed row at the given index. | |
| template<uint01 t_dims, class t_type> | |
| void | setVector (uint04 index, const Vector< t_dims, t_type > &value) |
| Sets a vector value at the given row index, writing each component individually. | |
| void | update (const TableChange &change) |
| Records a change to this column and updates the modification time. | |
| void | updateAll () |
| Marks the entire column as updated by recording a change spanning all rows. | |
Additional Inherited Members | |
| Public Types inherited from GraphicsBuffer | |
| enum | Type { VERTEX , UNIFORM , INDEX , INSTANCE , INDIRECT } |
| The usage type for this graphics buffer on the video card. More... | |
| Protected Attributes inherited from GraphicsBuffer | |
| uint08 | m_allocated_size |
| Allocated capacity in elements. | |
| Type | m_internal_type |
| Video card usage type. | |
| bool | m_is_accessable |
| Whether the buffer is CPU-accessible. | |
| bool | m_is_memory_owner |
| Whether this buffer owns the underlying memory. | |
| bool | m_is_normalized |
| Whether values are normalized on the GPU. | |
| uint08 | m_size |
| Current number of elements in the buffer. | |
| TypeInfo | m_type |
| Element type information. | |
| Protected Attributes inherited from TableColumn | |
| Buffer< TableChange > | m_changes |
| The list of recorded changes for change-tracking and synchronization. | |
| CompressionMode | m_compression_mode = CompressionMode::e_default_compression |
| The compression mode used when serializing this column. | |
| String | m_label |
| The display name or identifier for this column. | |
| Time | m_modified_time |
| The timestamp of the most recent modification to this column. | |
| UUID | m_reference_table = Constant<UUID>::Invalid |
| UUID of a table this column references, or Invalid if none. | |
Buffer for storing data in the OpenGL engine, usually for rendering.
Definition at line 14 of file GLBuffer.h.
|
inline |
Constructs an empty OpenGLBuffer with the given label.
| [in] | label | The human-readable label for this buffer. |
| [in] | device | The OpenGL graphics device. |
Definition at line 20 of file GLBuffer.h.
References GraphicsBuffer::GraphicsBuffer(), and TableColumn::label().
Referenced by OpenGLBuffer().
|
inline |
Constructs an OpenGLBuffer and copies data from a TableColumn.
| [in] | reference_data | The source data column. |
| [in] | device | The OpenGL graphics device. |
Definition at line 29 of file GLBuffer.h.
References GraphicsBuffer::GraphicsBuffer(), copyData(), and TableColumn::label().
|
inlinenoexcept |
Move constructor.
Transfers ownership of the GPU buffer.
| [in] | other | The buffer to move from. |
Definition at line 37 of file GLBuffer.h.
References OpenGLBuffer().
|
inline |
Destructor.
Cleans up the GPU buffer.
Definition at line 45 of file GLBuffer.h.
References cleanup().
Binds a sub-range of the buffer to its target binding point.
| [in] | offset | The element offset. |
| [in] | size | The number of elements to bind. |
Definition at line 248 of file GLBuffer.h.
References bindLocation(), bufferID(), GraphicsBuffer::size(), and GraphicsBuffer::type().
|
inline |
Returns the OpenGL binding target for this buffer type.
Definition at line 317 of file GLBuffer.h.
|
inline |
Returns the OpenGL buffer object ID.
Definition at line 235 of file GLBuffer.h.
References IsValid().
|
inlinefinaloverridevirtual |
Copies all data from a TableColumn into this buffer.
| [in] | reference_data | The source data column. |
| [in] | set_type | Whether to adopt the column's type. |
Implements GraphicsBuffer.
Definition at line 221 of file GLBuffer.h.
References cleanup(), TableColumn::m_modified_time, GraphicsBuffer::m_type, setSize(), GraphicsBuffer::setType(), and updateRegion().
Referenced by OpenGLBuffer().
|
inline |
Returns the OpenGL data type enum for the buffer.
Definition at line 175 of file GLBuffer.h.
References getFormat().
Referenced by getFormat(), setAttribute(), and setAttributeRange().
|
inline |
Returns the OpenGL data type enum for the buffer's element type.
Definition at line 110 of file GLBuffer.h.
References GraphicsBuffer::type().
Inserts rows into the buffer.
Not yet implemented.
Implements TableColumn.
Definition at line 180 of file GLBuffer.h.
|
inlinefinaloverridevirtual |
Maps a region of the buffer into CPU-accessible memory.
| [in] | offset | Byte offset into the buffer. |
| [in] | size | Number of bytes to map. |
Implements GraphicsBuffer.
Definition at line 56 of file GLBuffer.h.
References cast(), GraphicsBuffer::m_is_accessable, TableColumn::m_label, GraphicsBuffer::m_size, GraphicsBuffer::size(), and GraphicsBuffer::type().
Referenced by updateRegion().
|
inline |
Sets a vertex attribute pointer for the entire buffer.
| [in] | attribute | The vertex attribute index. |
| [in] | offset | The component offset within each element. |
| [in] | stride | The stride between elements. |
Definition at line 272 of file GLBuffer.h.
References bind(), cast(), getFormat(), IsInvalid(), setRawAttribute(), typeStride(), and vectorSize().
|
inline |
Sets a vertex attribute pointer for a sub-range of the buffer.
| [in] | attribute | The vertex attribute index. |
| [in] | buffer_start | The starting element. |
| [in] | buffer_size | The number of elements. |
| [in] | offset | The component offset within each element. |
| [in] | stride | The stride between elements. |
Definition at line 259 of file GLBuffer.h.
References bind(), cast(), getFormat(), IsInvalid(), setRawAttribute(), typeStride(), and vectorSize().
|
inline |
Sets a raw vertex attribute pointer with explicit format parameters.
| [in] | attribute | The vertex attribute index. |
| [in] | vector_size | The number of components per attribute. |
| [in] | format | The OpenGL data type. |
| [in] | stride | The byte stride between attributes. |
| [in] | offset | The byte offset to the first attribute. |
Definition at line 287 of file GLBuffer.h.
References GraphicsBuffer::INSTANCE, GraphicsBuffer::m_internal_type, GraphicsBuffer::m_is_accessable, GraphicsBuffer::type(), and GraphicsBuffer::VERTEX.
Referenced by setAttribute(), and setAttributeRange().
|
inlinefinaloverridevirtual |
Resizes the buffer to hold the specified number of elements.
| [in] | buffer_size | The new element count. |
Implements TableColumn.
Definition at line 186 of file GLBuffer.h.
References GraphicsBuffer::m_allocated_size, GraphicsBuffer::m_is_accessable, GraphicsBuffer::m_size, and GraphicsBuffer::type().
Referenced by copyData().
|
inline |
Returns the byte stride per element component.
Definition at line 148 of file GLBuffer.h.
References GraphicsBuffer::type().
Referenced by setAttribute(), and setAttributeRange().
|
inlinefinaloverridevirtual |
Unmaps previously mapped buffer memory.
Currently a no-op.
Implements GraphicsBuffer.
Definition at line 67 of file GLBuffer.h.
|
inlinefinaloverridevirtual |
Updates a sub-region of the buffer from a TableColumn.
| [in] | reference_data | The source data column. |
| [in] | offset | The element offset into the buffer. |
| [in] | size | The number of elements to update. |
Implements GraphicsBuffer.
Definition at line 199 of file GLBuffer.h.
References cast(), GraphicsBuffer::m_is_accessable, mapMemory(), GraphicsBuffer::size(), and GraphicsBuffer::type().
Referenced by copyData().
|
inline |
Returns the number of components per vertex attribute.
Definition at line 167 of file GLBuffer.h.
References cast(), getMax(), and GraphicsBuffer::type().
Referenced by setAttribute(), and setAttributeRange().