![]() |
NDEVR
API Documentation
|
A Special abstract TableColumn responsible for interfacing a Buffer of data with the video card. More...
Public Types | |
| enum | Type { VERTEX , UNIFORM , INDEX , INSTANCE , INDIRECT } |
| The usage type for this graphics buffer on the video card. More... | |
Public Member Functions | |
| 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 | cleanup ()=0 |
| Releases video card resources associated with 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 | copyData (const TableColumn &reference_data, bool set_type)=0 |
| Copies data from a reference column into this buffer. | |
| 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. | |
| virtual void | insertRows (uint04 location, uint04 size)=0 |
| Inserts a contiguous block of default-initialized rows at the given location. | |
| 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. | |
| virtual void | setDefaultValueFrom (const TableColumn &column)=0 |
| Copies the default value from another column. | |
| 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. | |
| virtual void | setSize (uint04 size)=0 |
| Sets the number of rows in this column. | |
| 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. | |
Protected Member Functions | |
| virtual void | getFromVideoCard (bool copy_existing)=0 |
| Retrieves buffer data from the video card into CPU memory. | |
| virtual void * | mapMemory (size_t offset, size_t size) const =0 |
| Maps a region of GPU memory for CPU access. | |
| virtual void | sendToVideoCard (bool copy_existing)=0 |
| Sends buffer data from CPU memory to the video card. | |
| virtual void | unmapMemory (size_t offset, size_t size) const =0 |
| Unmaps a previously mapped memory region. | |
| virtual void | updateRegion (const TableColumn &reference_data, uint04 offset, uint04 size)=0 |
| Updates a subregion of this buffer from a source column. | |
Protected Attributes | |
| 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. | |
A Special abstract TableColumn responsible for interfacing a Buffer of data with the video card.
Provides common interface for setting the memory around primitive types. GraphicsBuffers typically mirror local TableColumns and push updates to the video card at times when it is appropriate to do so.
Definition at line 46 of file GraphicsBuffer.h.
| enum GraphicsBuffer::Type |
The usage type for this graphics buffer on the video card.
| Enumerator | |
|---|---|
| VERTEX | Vertex attribute data. |
| UNIFORM | Uniform (constant) data. |
| INDEX | Index data for indexed drawing. |
| INSTANCE | Per-instance attribute data. |
| INDIRECT | Indirect draw command data. |
Definition at line 50 of file GraphicsBuffer.h.
| GraphicsBuffer::GraphicsBuffer | ( | const StringView & | label | ) |
Constructs a graphics buffer with the given label.
| [in] | label | A descriptive name for the buffer. |
References TableColumn::label().
Referenced by GraphicsBuffer(), OpenGLBuffer::OpenGLBuffer(), and OpenGLBuffer::OpenGLBuffer().
|
noexcept |
|
inlinefinalvirtual |
Returns a const pointer to the beginning of the underlying raw data.
Implements TableColumn.
Definition at line 511 of file GraphicsBuffer.h.
|
inlinefinalvirtual |
Returns a mutable pointer to the beginning of the underlying raw data.
Implements TableColumn.
Definition at line 508 of file GraphicsBuffer.h.
Referenced by updateRegion().
|
inlinenodiscardoverridevirtual |
Checks whether the stored string at the given row begins with the given prefix.
| [in] | index | The row index. |
| [in] | value | The prefix to check for. |
| [in] | ignore_case | Whether to perform a case-insensitive comparison. |
Implements TableColumn.
Definition at line 128 of file GraphicsBuffer.h.
|
inline |
Returns the allocated capacity of this buffer.
Definition at line 437 of file GraphicsBuffer.h.
References m_allocated_size.
|
inlineoverridevirtual |
Compresses the column data into the given compression object.
| [in] | object | The binary compression object to write into. |
Implements TableColumn.
Definition at line 108 of file GraphicsBuffer.h.
|
inlinenodiscardoverridevirtual |
Checks whether the stored string at the given row contains the given substring.
| [in] | index | The row index. |
| [in] | value | The substring to search for. |
| [in] | ignore_case | Whether to perform a case-insensitive comparison. |
Implements TableColumn.
Definition at line 127 of file GraphicsBuffer.h.
|
pure virtual |
Copies data from a reference column into this buffer.
| [in] | reference_data | The source column. |
| [in] | set_type | Whether to update this buffer's type to match. |
Implemented in OpenGLBuffer, and VulkanBuffer.
References TableColumn::TableColumn().
Copies the value from one row to another within this column.
| [in] | source | The source row index. |
| [in] | destination | The destination row index. |
Implements TableColumn.
Definition at line 380 of file GraphicsBuffer.h.
|
inlineoverridevirtual |
Copies a contiguous block of rows from one location to another within this column.
| [in] | source | The starting source row index. |
| [in] | destination | The starting destination row index. |
| [in] | size | The number of rows to copy. |
Implements TableColumn.
Definition at line 386 of file GraphicsBuffer.h.
References size().
|
inlinefinalvirtual |
Returns a const pointer to one past the end of the underlying raw data.
Implements TableColumn.
Definition at line 512 of file GraphicsBuffer.h.
|
inlinefinalvirtual |
Returns a mutable pointer to one past the end of the underlying raw data.
Implements TableColumn.
Definition at line 509 of file GraphicsBuffer.h.
|
inlinefinaloverridevirtual |
Retrieves a bool value at the given row index.
| [in] | index | The row index. |
| [out] | value | The retrieved value. |
Implements TableColumn.
Definition at line 365 of file GraphicsBuffer.h.
Retrieves a fltp04 value at the given row index.
| [in] | index | The row index. |
| [out] | value | The retrieved value. |
Implements TableColumn.
Definition at line 374 of file GraphicsBuffer.h.
Retrieves a fltp08 value at the given row index.
| [in] | index | The row index. |
| [out] | value | The retrieved value. |
Implements TableColumn.
Definition at line 375 of file GraphicsBuffer.h.
Retrieves an RGBColor value at the given row index.
| [in] | index | The row index. |
| [out] | value | The retrieved color value. |
Implements TableColumn.
Definition at line 378 of file GraphicsBuffer.h.
Retrieves a sint01 value at the given row index.
| [in] | index | The row index. |
| [out] | value | The retrieved value. |
Implements TableColumn.
Definition at line 370 of file GraphicsBuffer.h.
Retrieves a sint02 value at the given row index.
| [in] | index | The row index. |
| [out] | value | The retrieved value. |
Implements TableColumn.
Definition at line 371 of file GraphicsBuffer.h.
Retrieves a sint04 value at the given row index.
| [in] | index | The row index. |
| [out] | value | The retrieved value. |
Implements TableColumn.
Definition at line 372 of file GraphicsBuffer.h.
Retrieves a sint08 value at the given row index.
| [in] | index | The row index. |
| [out] | value | The retrieved value. |
Implements TableColumn.
Definition at line 373 of file GraphicsBuffer.h.
Retrieves a uint01 value at the given row index.
| [in] | index | The row index. |
| [out] | value | The retrieved value. |
Implements TableColumn.
Definition at line 366 of file GraphicsBuffer.h.
Retrieves a uint02 value at the given row index.
| [in] | index | The row index. |
| [out] | value | The retrieved value. |
Implements TableColumn.
Definition at line 367 of file GraphicsBuffer.h.
Retrieves a uint04 value at the given row index.
| [in] | index | The row index. |
| [out] | value | The retrieved value. |
Implements TableColumn.
Definition at line 368 of file GraphicsBuffer.h.
|
inlinefinaloverridevirtual |
Retrieves a bool value at a specific vector position within a row.
| [in] | index | The row index. |
| [in] | vector_pos | The component index within the vector. |
| [out] | value | The retrieved value. |
Implements TableColumn.
Definition at line 353 of file GraphicsBuffer.h.
|
inlinefinaloverridevirtual |
Retrieves a fltp04 value at a specific vector position within a row.
| [in] | index | The row index. |
| [in] | vector_pos | The component index within the vector. |
| [out] | value | The retrieved value. |
Implements TableColumn.
Definition at line 362 of file GraphicsBuffer.h.
|
inlinefinaloverridevirtual |
Retrieves a fltp08 value at a specific vector position within a row.
| [in] | index | The row index. |
| [in] | vector_pos | The component index within the vector. |
| [out] | value | The retrieved value. |
Implements TableColumn.
Definition at line 363 of file GraphicsBuffer.h.
|
inlinefinaloverridevirtual |
Retrieves a sint01 value at a specific vector position within a row.
| [in] | index | The row index. |
| [in] | vector_pos | The component index within the vector. |
| [out] | value | The retrieved value. |
Implements TableColumn.
Definition at line 358 of file GraphicsBuffer.h.
|
inlinefinaloverridevirtual |
Retrieves a sint02 value at a specific vector position within a row.
| [in] | index | The row index. |
| [in] | vector_pos | The component index within the vector. |
| [out] | value | The retrieved value. |
Implements TableColumn.
Definition at line 359 of file GraphicsBuffer.h.
|
inlinefinaloverridevirtual |
Retrieves a sint04 value at a specific vector position within a row.
| [in] | index | The row index. |
| [in] | vector_pos | The component index within the vector. |
| [out] | value | The retrieved value. |
Implements TableColumn.
Definition at line 360 of file GraphicsBuffer.h.
|
inlinefinaloverridevirtual |
Retrieves a sint08 value at a specific vector position within a row.
| [in] | index | The row index. |
| [in] | vector_pos | The component index within the vector. |
| [out] | value | The retrieved value. |
Implements TableColumn.
Definition at line 361 of file GraphicsBuffer.h.
|
inlinefinaloverridevirtual |
Retrieves a uint01 value at a specific vector position within a row.
| [in] | index | The row index. |
| [in] | vector_pos | The component index within the vector. |
| [out] | value | The retrieved value. |
Implements TableColumn.
Definition at line 354 of file GraphicsBuffer.h.
|
inlinefinaloverridevirtual |
Retrieves a uint02 value at a specific vector position within a row.
| [in] | index | The row index. |
| [in] | vector_pos | The component index within the vector. |
| [out] | value | The retrieved value. |
Implements TableColumn.
Definition at line 355 of file GraphicsBuffer.h.
|
inlinefinaloverridevirtual |
Retrieves a uint04 value at a specific vector position within a row.
| [in] | index | The row index. |
| [in] | vector_pos | The component index within the vector. |
| [out] | value | The retrieved value. |
Implements TableColumn.
Definition at line 356 of file GraphicsBuffer.h.
|
inlinefinaloverridevirtual |
Retrieves a uint08 value at a specific vector position within a row.
| [in] | index | The row index. |
| [in] | vector_pos | The component index within the vector. |
| [out] | value | The retrieved value. |
Implements TableColumn.
Definition at line 357 of file GraphicsBuffer.h.
Retrieves a uint08 value at the given row index.
| [in] | index | The row index. |
| [out] | value | The retrieved value. |
Implements TableColumn.
Definition at line 369 of file GraphicsBuffer.h.
|
inlinefinaloverridevirtual |
Retrieves a string value at the given row index as a StringAllocatingView.
| [in] | index | The row index. |
| [out] | value | The retrieved string value. |
Implements TableColumn.
Definition at line 377 of file GraphicsBuffer.h.
|
inlinefinaloverridevirtual |
Retrieves a string value at the given row index as a StringView.
| [in] | index | The row index. |
| [out] | value | The retrieved string view. |
Implements TableColumn.
Definition at line 376 of file GraphicsBuffer.h.
|
inlinefinaloverridevirtual |
Retrieves a string value at a specific vector position within a row.
| [in] | index | The row index. |
| [in] | vector_pos | The component index within the vector. |
| [out] | value | The retrieved string value. |
Implements TableColumn.
Definition at line 364 of file GraphicsBuffer.h.
|
inlineoverridevirtual |
Returns the default value for new rows as a string representation.
Implements TableColumn.
Definition at line 95 of file GraphicsBuffer.h.
|
protectedpure virtual |
Retrieves buffer data from the video card into CPU memory.
| [in] | copy_existing | Whether to copy existing GPU data. |
Implemented in OpenGLBuffer, and VulkanBuffer.
Referenced by setAccessable().
|
inlineoverridevirtual |
Creates a new TableColumn containing only the rows where the corresponding selected_indices entry is true.
| [in] | selected_indices | A boolean buffer indicating which rows to include. |
Implements TableColumn.
Definition at line 129 of file GraphicsBuffer.h.
References TableColumn::TableColumn().
|
inlinefinaloverridevirtual |
Inserts a default-initialized row at the given index, shifting subsequent rows.
| [in] | index | The position at which to insert the new row. |
Implements TableColumn.
Definition at line 427 of file GraphicsBuffer.h.
References TableColumn::insertRows().
Inserts a contiguous block of index entries at the given location.
| [in] | location | The position at which to insert. |
| [in] | size | The number of index entries to insert. |
Implements TableColumn.
Definition at line 393 of file GraphicsBuffer.h.
References size().
|
inline |
Checks whether the buffer is currently CPU-accessible.
Definition at line 101 of file GraphicsBuffer.h.
References m_is_accessable.
|
inlinenodiscardoverridevirtual |
Checks whether the stored string at the given row is exactly equal to the given value.
| [in] | index | The row index. |
| [in] | value | The string to compare against. |
Implements TableColumn.
Definition at line 126 of file GraphicsBuffer.h.
|
inlineoverridevirtual |
Maps this column from a binary file for deserialization.
| [in] | info | The binary file table info structure to read from. |
Reimplemented from TableColumn.
Definition at line 122 of file GraphicsBuffer.h.
References file.
|
protectedpure virtual |
Maps a region of GPU memory for CPU access.
| [in] | offset | Byte offset into the buffer. |
| [in] | size | Number of bytes to map. |
Implemented in OpenGLBuffer, and VulkanBuffer.
References size().
Referenced by sendToVideoCard(), and updateRegion().
|
inlineoverridevirtual |
Maps this column to a binary file using compression.
| [in] | info | The binary file table info structure. |
| [in] | object | The compression object to use. |
Reimplemented from TableColumn.
Definition at line 112 of file GraphicsBuffer.h.
References file.
|
inlineoverridevirtual |
Maps this column to a binary file for serialization.
| [in] | info | The binary file table info structure. |
| [in] | column_id | The column identifier within the file (parameter unnamed in declaration). |
Reimplemented from TableColumn.
Definition at line 117 of file GraphicsBuffer.h.
References file.
|
inlinefinaloverridevirtual |
Removes index entries using an offset lookup list.
| [in] | offset_lookup_list | A buffer mapping old indices to removal offsets. |
Implements TableColumn.
Definition at line 417 of file GraphicsBuffer.h.
Removes a contiguous block of index entries at the given location.
| [in] | location | The starting position. |
| [in] | size | The number of index entries to remove. |
Implements TableColumn.
Definition at line 399 of file GraphicsBuffer.h.
References size().
|
inlinefinaloverridevirtual |
Removes a single row at the given index.
| [in] | index | The row index to remove. |
Implements TableColumn.
Definition at line 423 of file GraphicsBuffer.h.
|
inlinefinaloverridevirtual |
Removes multiple rows identified by a sorted list of indices.
| [in] | sorted_remove_indices | A buffer of row indices to remove, sorted in ascending order. |
Implements TableColumn.
Definition at line 425 of file GraphicsBuffer.h.
Removes a contiguous block of rows starting at the given index.
| [in] | index | The starting row index. |
| [in] | size | The number of rows to remove. |
Implements TableColumn.
Definition at line 424 of file GraphicsBuffer.h.
References size().
|
inlineoverridevirtual |
Removes rows indicated by a boolean mask starting from a given offset.
| [in] | offset | The row offset to apply to the boolean indices. |
| [in] | indices | A boolean buffer where true indicates a row to remove. |
Implements TableColumn.
Definition at line 426 of file GraphicsBuffer.h.
|
protectedpure virtual |
Sends buffer data from CPU memory to the video card.
| [in] | copy_existing | Whether to copy existing CPU data. |
Implemented in OpenGLBuffer, and VulkanBuffer.
References mapMemory(), size(), TypeInfo::total_size, type(), and unmapMemory().
Referenced by setAccessable().
|
inlinefinaloverridevirtual |
Sets a bool value at the given row index.
| [in] | index | The row index. |
| [in] | value | The value to store. |
Implements TableColumn.
Definition at line 339 of file GraphicsBuffer.h.
Sets a fltp04 value at the given row index.
| [in] | index | The row index. |
| [in] | value | The value to store. |
Implements TableColumn.
Definition at line 348 of file GraphicsBuffer.h.
Sets a fltp08 value at the given row index.
| [in] | index | The row index. |
| [in] | value | The value to store. |
Implements TableColumn.
Definition at line 349 of file GraphicsBuffer.h.
Sets an RGBColor value at the given row index.
| [in] | index | The row index. |
| [in] | value | The color value to store. |
Implements TableColumn.
Definition at line 351 of file GraphicsBuffer.h.
Sets a sint01 value at the given row index.
| [in] | index | The row index. |
| [in] | value | The value to store. |
Implements TableColumn.
Definition at line 344 of file GraphicsBuffer.h.
Sets a sint02 value at the given row index.
| [in] | index | The row index. |
| [in] | value | The value to store. |
Implements TableColumn.
Definition at line 345 of file GraphicsBuffer.h.
Sets a sint04 value at the given row index.
| [in] | index | The row index. |
| [in] | value | The value to store. |
Implements TableColumn.
Definition at line 346 of file GraphicsBuffer.h.
Sets a sint08 value at the given row index.
| [in] | index | The row index. |
| [in] | value | The value to store. |
Implements TableColumn.
Definition at line 347 of file GraphicsBuffer.h.
Sets a uint01 value at the given row index.
| [in] | index | The row index. |
| [in] | value | The value to store. |
Implements TableColumn.
Definition at line 340 of file GraphicsBuffer.h.
Sets a uint02 value at the given row index.
| [in] | index | The row index. |
| [in] | value | The value to store. |
Implements TableColumn.
Definition at line 341 of file GraphicsBuffer.h.
Sets a uint04 value at the given row index.
| [in] | index | The row index. |
| [in] | value | The value to store. |
Implements TableColumn.
Definition at line 342 of file GraphicsBuffer.h.
Sets a bool value at a specific vector position within a row.
| [in] | index | The row index. |
| [in] | vector_pos | The component index within the vector. |
| [in] | value | The value to store. |
Implements TableColumn.
Definition at line 325 of file GraphicsBuffer.h.
|
inlinefinaloverridevirtual |
Sets a fltp04 value at a specific vector position within a row.
| [in] | index | The row index. |
| [in] | vector_pos | The component index within the vector. |
| [in] | value | The value to store. |
Implements TableColumn.
Definition at line 334 of file GraphicsBuffer.h.
|
inlinefinaloverridevirtual |
Sets a fltp08 value at a specific vector position within a row.
| [in] | index | The row index. |
| [in] | vector_pos | The component index within the vector. |
| [in] | value | The value to store. |
Implements TableColumn.
Definition at line 335 of file GraphicsBuffer.h.
|
inlinefinaloverridevirtual |
Sets a sint01 value at a specific vector position within a row.
| [in] | index | The row index. |
| [in] | vector_pos | The component index within the vector. |
| [in] | value | The value to store. |
Implements TableColumn.
Definition at line 330 of file GraphicsBuffer.h.
|
inlinefinaloverridevirtual |
Sets a sint02 value at a specific vector position within a row.
| [in] | index | The row index. |
| [in] | vector_pos | The component index within the vector. |
| [in] | value | The value to store. |
Implements TableColumn.
Definition at line 331 of file GraphicsBuffer.h.
|
inlinefinaloverridevirtual |
Sets a sint04 value at a specific vector position within a row.
| [in] | index | The row index. |
| [in] | vector_pos | The component index within the vector. |
| [in] | value | The value to store. |
Implements TableColumn.
Definition at line 332 of file GraphicsBuffer.h.
|
inlinefinaloverridevirtual |
Sets a sint08 value at a specific vector position within a row.
| [in] | index | The row index. |
| [in] | vector_pos | The component index within the vector. |
| [in] | value | The value to store. |
Implements TableColumn.
Definition at line 333 of file GraphicsBuffer.h.
|
inlinefinaloverridevirtual |
Sets a uint01 value at a specific vector position within a row.
| [in] | index | The row index. |
| [in] | vector_pos | The component index within the vector. |
| [in] | value | The value to store. |
Implements TableColumn.
Definition at line 326 of file GraphicsBuffer.h.
|
inlinefinaloverridevirtual |
Sets a uint02 value at a specific vector position within a row.
| [in] | index | The row index. |
| [in] | vector_pos | The component index within the vector. |
| [in] | value | The value to store. |
Implements TableColumn.
Definition at line 327 of file GraphicsBuffer.h.
|
inlinefinaloverridevirtual |
Sets a uint04 value at a specific vector position within a row.
| [in] | index | The row index. |
| [in] | vector_pos | The component index within the vector. |
| [in] | value | The value to store. |
Implements TableColumn.
Definition at line 328 of file GraphicsBuffer.h.
|
inlinefinaloverridevirtual |
Sets a uint08 value at a specific vector position within a row.
| [in] | index | The row index. |
| [in] | vector_pos | The component index within the vector. |
| [in] | value | The value to store. |
Implements TableColumn.
Definition at line 329 of file GraphicsBuffer.h.
Sets a uint08 value at the given row index.
| [in] | index | The row index. |
| [in] | value | The value to store. |
Implements TableColumn.
Definition at line 343 of file GraphicsBuffer.h.
|
inlinefinaloverridevirtual |
Sets a string value at the given row index.
| [in] | index | The row index. |
| [in] | value | The string view to store. |
Implements TableColumn.
Definition at line 350 of file GraphicsBuffer.h.
|
inlinefinaloverridevirtual |
Sets a string value at a specific vector position within a row.
| [in] | index | The row index. |
| [in] | vector_pos | The component index within the vector. |
| [in] | value | The string view to store. |
Implements TableColumn.
Definition at line 337 of file GraphicsBuffer.h.
|
inlinevirtual |
Sets whether the buffer is CPU-accessible.
| [in] | is_accessable | Whether CPU access is enabled. |
| [in] | copy_existing | Whether to copy existing data during the transition. |
Definition at line 78 of file GraphicsBuffer.h.
References getFromVideoCard(), m_allocated_size, m_is_accessable, and sendToVideoCard().
|
inlineoverridevirtual |
Sets the default value for new rows from a string representation.
| [in] | value | The string representation of the default value. |
Implements TableColumn.
Definition at line 93 of file GraphicsBuffer.h.
| void GraphicsBuffer::setType | ( | const TypeInfo & | type | ) |
Sets the element type for this buffer.
| [in] | type | The new type information. |
References type().
Referenced by OpenGLBuffer::copyData().
|
inline |
Sets the video card usage type for this buffer.
| [in] | type | The buffer usage type. |
Definition at line 104 of file GraphicsBuffer.h.
References m_internal_type, and type().
|
inlinefinaloverridevirtual |
Returns the number of rows in this column.
Implements TableColumn.
Definition at line 418 of file GraphicsBuffer.h.
References cast(), and m_size.
Referenced by OpenGLBuffer::bind(), VulkanBuffer::copyBuffer(), copyRows(), VulkanBuffer::CreateVKBuffer(), insertIndices(), mapMemory(), OpenGLBuffer::mapMemory(), VulkanBuffer::mapMemory(), removeIndices(), removeRows(), sendToVideoCard(), unmapMemory(), VulkanBuffer::unmapMemory(), updateRegion(), OpenGLBuffer::updateRegion(), and VulkanBuffer::updateRegion().
Swaps the values at two row indices.
| [in] | a | The first row index. |
| [in] | b | The second row index. |
Implements TableColumn.
Definition at line 405 of file GraphicsBuffer.h.
Swaps two index entries.
Used for reordering index-based columns.
| [in] | a | The first index. |
| [in] | b | The second index. |
Implements TableColumn.
Definition at line 411 of file GraphicsBuffer.h.
|
inlineoverridevirtual |
Returns the type information for this buffer.
Implements TableColumn.
Definition at line 69 of file GraphicsBuffer.h.
References m_type.
Referenced by OpenGLBuffer::bind(), OpenGLBuffer::getFormat(), OpenGLBuffer::getFromVideoCard(), OpenGLBuffer::mapMemory(), sendToVideoCard(), OpenGLBuffer::setRawAttribute(), OpenGLBuffer::setSize(), setType(), setUsage(), OpenGLBuffer::typeStride(), updateRegion(), OpenGLBuffer::updateRegion(), and OpenGLBuffer::vectorSize().
|
protectedpure virtual |
Unmaps a previously mapped memory region.
| [in] | offset | Byte offset that was mapped. |
| [in] | size | Number of bytes that were mapped. |
Implemented in OpenGLBuffer, and VulkanBuffer.
References size().
Referenced by sendToVideoCard(), and updateRegion().
|
overridevirtual |
Synchronizes this buffer from a source TableColumn.
| [in] | column | The source column. |
Reimplemented from TableColumn.
References TableColumn::TableColumn().
|
protectedpure virtual |
Updates a subregion of this buffer from a source column.
| [in] | reference_data | The source column. |
| [in] | offset | Start index in this buffer. |
| [in] | size | Number of elements to update. |
Implemented in OpenGLBuffer, and VulkanBuffer.
References TableColumn::TableColumn(), begin(), TypeInfo::byte_size, mapMemory(), size(), type(), and unmapMemory().