NDEVR
API Documentation
GraphicsBufferabstract

A Special abstract TableColumn responsible for interfacing a Buffer of data with the video card. More...

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

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 TableColumngetSelected (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< TableChangechangesSince (const Time &time) const
 Returns all changes recorded since the given time.
Buffer< TableChangechangesSince (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 Stringlabel () 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< TableChangem_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.

Detailed Description

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.

Member Enumeration Documentation

◆ 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.

Constructor & Destructor Documentation

◆ GraphicsBuffer() [1/2]

GraphicsBuffer::GraphicsBuffer ( const StringView & label)

Constructs a graphics buffer with the given label.

Parameters
[in]labelA descriptive name for the buffer.

References TableColumn::label().

Referenced by GraphicsBuffer(), OpenGLBuffer::OpenGLBuffer(), and OpenGLBuffer::OpenGLBuffer().

◆ GraphicsBuffer() [2/2]

GraphicsBuffer::GraphicsBuffer ( GraphicsBuffer && buffer)
noexcept

Move constructor.

Parameters
[in]bufferThe buffer to move from.

References GraphicsBuffer().

Member Function Documentation

◆ begin() [1/2]

const void * GraphicsBuffer::begin ( ) const
inlinefinalvirtual

Returns a const pointer to the beginning of the underlying raw data.

Returns
A const void pointer to the start of the data, or nullptr if not available.

Implements TableColumn.

Definition at line 511 of file GraphicsBuffer.h.

◆ begin() [2/2]

void * GraphicsBuffer::begin ( )
inlinefinalvirtual

Returns a mutable pointer to the beginning of the underlying raw data.

Returns
A void pointer to the start of the data, or nullptr if not available.

Implements TableColumn.

Definition at line 508 of file GraphicsBuffer.h.

Referenced by updateRegion().

◆ beginsWith()

bool GraphicsBuffer::beginsWith ( uint04 index,
const StringView & value,
bool ignore_case ) const
inlinenodiscardoverridevirtual

Checks whether the stored string at the given row begins with the given prefix.

Parameters
[in]indexThe row index.
[in]valueThe prefix to check for.
[in]ignore_caseWhether to perform a case-insensitive comparison.
Returns
True if the stored string begins with the given value.

Implements TableColumn.

Definition at line 128 of file GraphicsBuffer.h.

◆ capacity()

uint08 GraphicsBuffer::capacity ( )
inline

Returns the allocated capacity of this buffer.

Returns
The capacity in elements.

Definition at line 437 of file GraphicsBuffer.h.

References m_allocated_size.

◆ compress()

virtual void GraphicsBuffer::compress ( BinaryCompressionObject & object)
inlineoverridevirtual

Compresses the column data into the given compression object.

Parameters
[in]objectThe binary compression object to write into.

Implements TableColumn.

Definition at line 108 of file GraphicsBuffer.h.

◆ contains()

bool GraphicsBuffer::contains ( uint04 index,
const StringView & value,
bool ignore_case ) const
inlinenodiscardoverridevirtual

Checks whether the stored string at the given row contains the given substring.

Parameters
[in]indexThe row index.
[in]valueThe substring to search for.
[in]ignore_caseWhether to perform a case-insensitive comparison.
Returns
True if the stored string contains the given value.

Implements TableColumn.

Definition at line 127 of file GraphicsBuffer.h.

◆ copyData()

virtual void GraphicsBuffer::copyData ( const TableColumn & reference_data,
bool set_type )
pure virtual

Copies data from a reference column into this buffer.

Parameters
[in]reference_dataThe source column.
[in]set_typeWhether to update this buffer's type to match.

Implemented in OpenGLBuffer, and VulkanBuffer.

References TableColumn::TableColumn().

◆ copyRow()

virtual void GraphicsBuffer::copyRow ( uint04 source,
uint04 destination )
inlineoverridevirtual

Copies the value from one row to another within this column.

Parameters
[in]sourceThe source row index.
[in]destinationThe destination row index.

Implements TableColumn.

Definition at line 380 of file GraphicsBuffer.h.

◆ copyRows()

virtual void GraphicsBuffer::copyRows ( uint04 source,
uint04 destination,
uint04 size )
inlineoverridevirtual

Copies a contiguous block of rows from one location to another within this column.

Parameters
[in]sourceThe starting source row index.
[in]destinationThe starting destination row index.
[in]sizeThe number of rows to copy.

Implements TableColumn.

Definition at line 386 of file GraphicsBuffer.h.

References size().

◆ end() [1/2]

const void * GraphicsBuffer::end ( ) const
inlinefinalvirtual

Returns a const pointer to one past the end of the underlying raw data.

Returns
A const void pointer to one past the end of the data, or nullptr if not available.

Implements TableColumn.

Definition at line 512 of file GraphicsBuffer.h.

◆ end() [2/2]

void * GraphicsBuffer::end ( )
inlinefinalvirtual

Returns a mutable pointer to one past the end of the underlying raw data.

Returns
A void pointer to one past the end of the data, or nullptr if not available.

Implements TableColumn.

Definition at line 509 of file GraphicsBuffer.h.

◆ get() [1/26]

void GraphicsBuffer::get ( uint04 index,
bool & value ) const
inlinefinaloverridevirtual

Retrieves a bool value at the given row index.

Parameters
[in]indexThe row index.
[out]valueThe retrieved value.

Implements TableColumn.

Definition at line 365 of file GraphicsBuffer.h.

◆ get() [2/26]

void GraphicsBuffer::get ( uint04 index,
fltp04 & value ) const
inlinefinaloverridevirtual

Retrieves a fltp04 value at the given row index.

Parameters
[in]indexThe row index.
[out]valueThe retrieved value.

Implements TableColumn.

Definition at line 374 of file GraphicsBuffer.h.

◆ get() [3/26]

void GraphicsBuffer::get ( uint04 index,
fltp08 & value ) const
inlinefinaloverridevirtual

Retrieves a fltp08 value at the given row index.

Parameters
[in]indexThe row index.
[out]valueThe retrieved value.

Implements TableColumn.

Definition at line 375 of file GraphicsBuffer.h.

◆ get() [4/26]

void GraphicsBuffer::get ( uint04 index,
RGBColor & value ) const
inlinefinaloverridevirtual

Retrieves an RGBColor value at the given row index.

Parameters
[in]indexThe row index.
[out]valueThe retrieved color value.

Implements TableColumn.

Definition at line 378 of file GraphicsBuffer.h.

◆ get() [5/26]

void GraphicsBuffer::get ( uint04 index,
sint01 & value ) const
inlinefinaloverridevirtual

Retrieves a sint01 value at the given row index.

Parameters
[in]indexThe row index.
[out]valueThe retrieved value.

Implements TableColumn.

Definition at line 370 of file GraphicsBuffer.h.

◆ get() [6/26]

void GraphicsBuffer::get ( uint04 index,
sint02 & value ) const
inlinefinaloverridevirtual

Retrieves a sint02 value at the given row index.

Parameters
[in]indexThe row index.
[out]valueThe retrieved value.

Implements TableColumn.

Definition at line 371 of file GraphicsBuffer.h.

◆ get() [7/26]

void GraphicsBuffer::get ( uint04 index,
sint04 & value ) const
inlinefinaloverridevirtual

Retrieves a sint04 value at the given row index.

Parameters
[in]indexThe row index.
[out]valueThe retrieved value.

Implements TableColumn.

Definition at line 372 of file GraphicsBuffer.h.

◆ get() [8/26]

void GraphicsBuffer::get ( uint04 index,
sint08 & value ) const
inlinefinaloverridevirtual

Retrieves a sint08 value at the given row index.

Parameters
[in]indexThe row index.
[out]valueThe retrieved value.

Implements TableColumn.

Definition at line 373 of file GraphicsBuffer.h.

◆ get() [9/26]

void GraphicsBuffer::get ( uint04 index,
uint01 & value ) const
inlinefinaloverridevirtual

Retrieves a uint01 value at the given row index.

Parameters
[in]indexThe row index.
[out]valueThe retrieved value.

Implements TableColumn.

Definition at line 366 of file GraphicsBuffer.h.

◆ get() [10/26]

void GraphicsBuffer::get ( uint04 index,
uint02 & value ) const
inlinefinaloverridevirtual

Retrieves a uint02 value at the given row index.

Parameters
[in]indexThe row index.
[out]valueThe retrieved value.

Implements TableColumn.

Definition at line 367 of file GraphicsBuffer.h.

◆ get() [11/26]

void GraphicsBuffer::get ( uint04 index,
uint04 & value ) const
inlinefinaloverridevirtual

Retrieves a uint04 value at the given row index.

Parameters
[in]indexThe row index.
[out]valueThe retrieved value.

Implements TableColumn.

Definition at line 368 of file GraphicsBuffer.h.

◆ get() [12/26]

void GraphicsBuffer::get ( uint04 index,
uint04 vector_pos,
bool & value ) const
inlinefinaloverridevirtual

Retrieves a bool value at a specific vector position within a row.

Parameters
[in]indexThe row index.
[in]vector_posThe component index within the vector.
[out]valueThe retrieved value.

Implements TableColumn.

Definition at line 353 of file GraphicsBuffer.h.

◆ get() [13/26]

void GraphicsBuffer::get ( uint04 index,
uint04 vector_pos,
fltp04 & value ) const
inlinefinaloverridevirtual

Retrieves a fltp04 value at a specific vector position within a row.

Parameters
[in]indexThe row index.
[in]vector_posThe component index within the vector.
[out]valueThe retrieved value.

Implements TableColumn.

Definition at line 362 of file GraphicsBuffer.h.

◆ get() [14/26]

void GraphicsBuffer::get ( uint04 index,
uint04 vector_pos,
fltp08 & value ) const
inlinefinaloverridevirtual

Retrieves a fltp08 value at a specific vector position within a row.

Parameters
[in]indexThe row index.
[in]vector_posThe component index within the vector.
[out]valueThe retrieved value.

Implements TableColumn.

Definition at line 363 of file GraphicsBuffer.h.

◆ get() [15/26]

void GraphicsBuffer::get ( uint04 index,
uint04 vector_pos,
sint01 & value ) const
inlinefinaloverridevirtual

Retrieves a sint01 value at a specific vector position within a row.

Parameters
[in]indexThe row index.
[in]vector_posThe component index within the vector.
[out]valueThe retrieved value.

Implements TableColumn.

Definition at line 358 of file GraphicsBuffer.h.

◆ get() [16/26]

void GraphicsBuffer::get ( uint04 index,
uint04 vector_pos,
sint02 & value ) const
inlinefinaloverridevirtual

Retrieves a sint02 value at a specific vector position within a row.

Parameters
[in]indexThe row index.
[in]vector_posThe component index within the vector.
[out]valueThe retrieved value.

Implements TableColumn.

Definition at line 359 of file GraphicsBuffer.h.

◆ get() [17/26]

void GraphicsBuffer::get ( uint04 index,
uint04 vector_pos,
sint04 & value ) const
inlinefinaloverridevirtual

Retrieves a sint04 value at a specific vector position within a row.

Parameters
[in]indexThe row index.
[in]vector_posThe component index within the vector.
[out]valueThe retrieved value.

Implements TableColumn.

Definition at line 360 of file GraphicsBuffer.h.

◆ get() [18/26]

void GraphicsBuffer::get ( uint04 index,
uint04 vector_pos,
sint08 & value ) const
inlinefinaloverridevirtual

Retrieves a sint08 value at a specific vector position within a row.

Parameters
[in]indexThe row index.
[in]vector_posThe component index within the vector.
[out]valueThe retrieved value.

Implements TableColumn.

Definition at line 361 of file GraphicsBuffer.h.

◆ get() [19/26]

void GraphicsBuffer::get ( uint04 index,
uint04 vector_pos,
uint01 & value ) const
inlinefinaloverridevirtual

Retrieves a uint01 value at a specific vector position within a row.

Parameters
[in]indexThe row index.
[in]vector_posThe component index within the vector.
[out]valueThe retrieved value.

Implements TableColumn.

Definition at line 354 of file GraphicsBuffer.h.

◆ get() [20/26]

void GraphicsBuffer::get ( uint04 index,
uint04 vector_pos,
uint02 & value ) const
inlinefinaloverridevirtual

Retrieves a uint02 value at a specific vector position within a row.

Parameters
[in]indexThe row index.
[in]vector_posThe component index within the vector.
[out]valueThe retrieved value.

Implements TableColumn.

Definition at line 355 of file GraphicsBuffer.h.

◆ get() [21/26]

void GraphicsBuffer::get ( uint04 index,
uint04 vector_pos,
uint04 & value ) const
inlinefinaloverridevirtual

Retrieves a uint04 value at a specific vector position within a row.

Parameters
[in]indexThe row index.
[in]vector_posThe component index within the vector.
[out]valueThe retrieved value.

Implements TableColumn.

Definition at line 356 of file GraphicsBuffer.h.

◆ get() [22/26]

void GraphicsBuffer::get ( uint04 index,
uint04 vector_pos,
uint08 & value ) const
inlinefinaloverridevirtual

Retrieves a uint08 value at a specific vector position within a row.

Parameters
[in]indexThe row index.
[in]vector_posThe component index within the vector.
[out]valueThe retrieved value.

Implements TableColumn.

Definition at line 357 of file GraphicsBuffer.h.

◆ get() [23/26]

void GraphicsBuffer::get ( uint04 index,
uint08 & value ) const
inlinefinaloverridevirtual

Retrieves a uint08 value at the given row index.

Parameters
[in]indexThe row index.
[out]valueThe retrieved value.

Implements TableColumn.

Definition at line 369 of file GraphicsBuffer.h.

◆ get() [24/26]

void GraphicsBuffer::get ( uint04 index,
StringAllocatingView & value ) const
inlinefinaloverridevirtual

Retrieves a string value at the given row index as a StringAllocatingView.

Parameters
[in]indexThe row index.
[out]valueThe retrieved string value.

Implements TableColumn.

Definition at line 377 of file GraphicsBuffer.h.

◆ get() [25/26]

void GraphicsBuffer::get ( uint04 index,
StringView & value ) const
inlinefinaloverridevirtual

Retrieves a string value at the given row index as a StringView.

Parameters
[in]indexThe row index.
[out]valueThe retrieved string view.

Implements TableColumn.

Definition at line 376 of file GraphicsBuffer.h.

◆ get() [26/26]

void GraphicsBuffer::get ( uint04 index,
uint04 vector_pos,
StringAllocatingView & value ) const
inlinefinaloverridevirtual

Retrieves a string value at a specific vector position within a row.

Parameters
[in]indexThe row index.
[in]vector_posThe component index within the vector.
[out]valueThe retrieved string value.

Implements TableColumn.

Definition at line 364 of file GraphicsBuffer.h.

◆ getDefaultValue()

const StringAllocatingView GraphicsBuffer::getDefaultValue ( ) const
inlineoverridevirtual

Returns the default value for new rows as a string representation.

Returns
The default value as a StringAllocatingView.

Implements TableColumn.

Definition at line 95 of file GraphicsBuffer.h.

◆ getFromVideoCard()

virtual void GraphicsBuffer::getFromVideoCard ( bool copy_existing)
protectedpure virtual

Retrieves buffer data from the video card into CPU memory.

Parameters
[in]copy_existingWhether to copy existing GPU data.

Implemented in OpenGLBuffer, and VulkanBuffer.

Referenced by setAccessable().

◆ getSelected()

virtual TableColumn * GraphicsBuffer::getSelected ( const Buffer< bool > & selected_indices) const
inlineoverridevirtual

Creates a new TableColumn containing only the rows where the corresponding selected_indices entry is true.

Parameters
[in]selected_indicesA boolean buffer indicating which rows to include.
Returns
A newly allocated TableColumn containing the selected rows. Caller owns the pointer.

Implements TableColumn.

Definition at line 129 of file GraphicsBuffer.h.

References TableColumn::TableColumn().

◆ insert()

void GraphicsBuffer::insert ( uint04 index)
inlinefinaloverridevirtual

Inserts a default-initialized row at the given index, shifting subsequent rows.

Parameters
[in]indexThe position at which to insert the new row.

Implements TableColumn.

Definition at line 427 of file GraphicsBuffer.h.

References TableColumn::insertRows().

◆ insertIndices()

virtual void GraphicsBuffer::insertIndices ( uint04 location,
uint04 size )
inlineoverridevirtual

Inserts a contiguous block of index entries at the given location.

Parameters
[in]locationThe position at which to insert.
[in]sizeThe number of index entries to insert.

Implements TableColumn.

Definition at line 393 of file GraphicsBuffer.h.

References size().

◆ isAccessable()

bool GraphicsBuffer::isAccessable ( ) const
inline

Checks whether the buffer is currently CPU-accessible.

Returns
True if accessible.

Definition at line 101 of file GraphicsBuffer.h.

References m_is_accessable.

◆ isSame()

bool GraphicsBuffer::isSame ( uint04 index,
const StringView & value ) const
inlinenodiscardoverridevirtual

Checks whether the stored string at the given row is exactly equal to the given value.

Parameters
[in]indexThe row index.
[in]valueThe string to compare against.
Returns
True if the stored string equals the given value.

Implements TableColumn.

Definition at line 126 of file GraphicsBuffer.h.

◆ mapFromFile()

virtual void GraphicsBuffer::mapFromFile ( BinaryFileTableInfo & )
inlineoverridevirtual

Maps this column from a binary file for deserialization.

Parameters
[in]infoThe binary file table info structure to read from.

Reimplemented from TableColumn.

Definition at line 122 of file GraphicsBuffer.h.

References file.

◆ mapMemory()

virtual void * GraphicsBuffer::mapMemory ( size_t offset,
size_t size ) const
protectedpure virtual

Maps a region of GPU memory for CPU access.

Parameters
[in]offsetByte offset into the buffer.
[in]sizeNumber of bytes to map.
Returns
Pointer to the mapped memory region.

Implemented in OpenGLBuffer, and VulkanBuffer.

References size().

Referenced by sendToVideoCard(), and updateRegion().

◆ mapToFile() [1/2]

virtual void GraphicsBuffer::mapToFile ( BinaryFileTableInfo & ,
BinaryCompressionObject &  )
inlineoverridevirtual

Maps this column to a binary file using compression.

Parameters
[in]infoThe binary file table info structure.
[in]objectThe compression object to use.

Reimplemented from TableColumn.

Definition at line 112 of file GraphicsBuffer.h.

References file.

◆ mapToFile() [2/2]

virtual void GraphicsBuffer::mapToFile ( BinaryFileTableInfo & ,
int  )
inlineoverridevirtual

Maps this column to a binary file for serialization.

Parameters
[in]infoThe binary file table info structure.
[in]column_idThe column identifier within the file (parameter unnamed in declaration).

Reimplemented from TableColumn.

Definition at line 117 of file GraphicsBuffer.h.

References file.

◆ removeIndices() [1/2]

void GraphicsBuffer::removeIndices ( const Buffer< uint04 > & offset_lookup_list)
inlinefinaloverridevirtual

Removes index entries using an offset lookup list.

Parameters
[in]offset_lookup_listA buffer mapping old indices to removal offsets.

Implements TableColumn.

Definition at line 417 of file GraphicsBuffer.h.

◆ removeIndices() [2/2]

virtual void GraphicsBuffer::removeIndices ( uint04 location,
uint04 size )
inlineoverridevirtual

Removes a contiguous block of index entries at the given location.

Parameters
[in]locationThe starting position.
[in]sizeThe number of index entries to remove.

Implements TableColumn.

Definition at line 399 of file GraphicsBuffer.h.

References size().

◆ removeRow()

void GraphicsBuffer::removeRow ( uint04 index)
inlinefinaloverridevirtual

Removes a single row at the given index.

Parameters
[in]indexThe row index to remove.

Implements TableColumn.

Definition at line 423 of file GraphicsBuffer.h.

◆ removeRows() [1/3]

void GraphicsBuffer::removeRows ( const Buffer< uint04 > & sorted_remove_indices)
inlinefinaloverridevirtual

Removes multiple rows identified by a sorted list of indices.

Parameters
[in]sorted_remove_indicesA buffer of row indices to remove, sorted in ascending order.

Implements TableColumn.

Definition at line 425 of file GraphicsBuffer.h.

◆ removeRows() [2/3]

void GraphicsBuffer::removeRows ( uint04 index,
uint04 size )
inlinefinaloverridevirtual

Removes a contiguous block of rows starting at the given index.

Parameters
[in]indexThe starting row index.
[in]sizeThe number of rows to remove.

Implements TableColumn.

Definition at line 424 of file GraphicsBuffer.h.

References size().

◆ removeRows() [3/3]

void GraphicsBuffer::removeRows ( uint04 offset,
const Buffer< bool > & indices )
inlineoverridevirtual

Removes rows indicated by a boolean mask starting from a given offset.

Parameters
[in]offsetThe row offset to apply to the boolean indices.
[in]indicesA boolean buffer where true indicates a row to remove.

Implements TableColumn.

Definition at line 426 of file GraphicsBuffer.h.

◆ sendToVideoCard()

virtual void GraphicsBuffer::sendToVideoCard ( bool copy_existing)
protectedpure virtual

Sends buffer data from CPU memory to the video card.

Parameters
[in]copy_existingWhether to copy existing CPU data.

Implemented in OpenGLBuffer, and VulkanBuffer.

References mapMemory(), size(), TypeInfo::total_size, type(), and unmapMemory().

Referenced by setAccessable().

◆ set() [1/25]

void GraphicsBuffer::set ( uint04 index,
bool value )
inlinefinaloverridevirtual

Sets a bool value at the given row index.

Parameters
[in]indexThe row index.
[in]valueThe value to store.

Implements TableColumn.

Definition at line 339 of file GraphicsBuffer.h.

◆ set() [2/25]

void GraphicsBuffer::set ( uint04 index,
fltp04 value )
inlinefinaloverridevirtual

Sets a fltp04 value at the given row index.

Parameters
[in]indexThe row index.
[in]valueThe value to store.

Implements TableColumn.

Definition at line 348 of file GraphicsBuffer.h.

◆ set() [3/25]

void GraphicsBuffer::set ( uint04 index,
fltp08 value )
inlinefinaloverridevirtual

Sets a fltp08 value at the given row index.

Parameters
[in]indexThe row index.
[in]valueThe value to store.

Implements TableColumn.

Definition at line 349 of file GraphicsBuffer.h.

◆ set() [4/25]

void GraphicsBuffer::set ( uint04 index,
RGBColor value )
inlinefinaloverridevirtual

Sets an RGBColor value at the given row index.

Parameters
[in]indexThe row index.
[in]valueThe color value to store.

Implements TableColumn.

Definition at line 351 of file GraphicsBuffer.h.

◆ set() [5/25]

void GraphicsBuffer::set ( uint04 index,
sint01 value )
inlinefinaloverridevirtual

Sets a sint01 value at the given row index.

Parameters
[in]indexThe row index.
[in]valueThe value to store.

Implements TableColumn.

Definition at line 344 of file GraphicsBuffer.h.

◆ set() [6/25]

void GraphicsBuffer::set ( uint04 index,
sint02 value )
inlinefinaloverridevirtual

Sets a sint02 value at the given row index.

Parameters
[in]indexThe row index.
[in]valueThe value to store.

Implements TableColumn.

Definition at line 345 of file GraphicsBuffer.h.

◆ set() [7/25]

void GraphicsBuffer::set ( uint04 index,
sint04 value )
inlinefinaloverridevirtual

Sets a sint04 value at the given row index.

Parameters
[in]indexThe row index.
[in]valueThe value to store.

Implements TableColumn.

Definition at line 346 of file GraphicsBuffer.h.

◆ set() [8/25]

void GraphicsBuffer::set ( uint04 index,
sint08 value )
inlinefinaloverridevirtual

Sets a sint08 value at the given row index.

Parameters
[in]indexThe row index.
[in]valueThe value to store.

Implements TableColumn.

Definition at line 347 of file GraphicsBuffer.h.

◆ set() [9/25]

void GraphicsBuffer::set ( uint04 index,
uint01 value )
inlinefinaloverridevirtual

Sets a uint01 value at the given row index.

Parameters
[in]indexThe row index.
[in]valueThe value to store.

Implements TableColumn.

Definition at line 340 of file GraphicsBuffer.h.

◆ set() [10/25]

void GraphicsBuffer::set ( uint04 index,
uint02 value )
inlinefinaloverridevirtual

Sets a uint02 value at the given row index.

Parameters
[in]indexThe row index.
[in]valueThe value to store.

Implements TableColumn.

Definition at line 341 of file GraphicsBuffer.h.

◆ set() [11/25]

void GraphicsBuffer::set ( uint04 index,
uint04 value )
inlinefinaloverridevirtual

Sets a uint04 value at the given row index.

Parameters
[in]indexThe row index.
[in]valueThe value to store.

Implements TableColumn.

Definition at line 342 of file GraphicsBuffer.h.

◆ set() [12/25]

void GraphicsBuffer::set ( uint04 index,
uint04 vector_pos,
bool value )
inlinefinaloverridevirtual

Sets a bool value at a specific vector position within a row.

Parameters
[in]indexThe row index.
[in]vector_posThe component index within the vector.
[in]valueThe value to store.

Implements TableColumn.

Definition at line 325 of file GraphicsBuffer.h.

◆ set() [13/25]

void GraphicsBuffer::set ( uint04 index,
uint04 vector_pos,
fltp04 value )
inlinefinaloverridevirtual

Sets a fltp04 value at a specific vector position within a row.

Parameters
[in]indexThe row index.
[in]vector_posThe component index within the vector.
[in]valueThe value to store.

Implements TableColumn.

Definition at line 334 of file GraphicsBuffer.h.

◆ set() [14/25]

void GraphicsBuffer::set ( uint04 index,
uint04 vector_pos,
fltp08 value )
inlinefinaloverridevirtual

Sets a fltp08 value at a specific vector position within a row.

Parameters
[in]indexThe row index.
[in]vector_posThe component index within the vector.
[in]valueThe value to store.

Implements TableColumn.

Definition at line 335 of file GraphicsBuffer.h.

◆ set() [15/25]

void GraphicsBuffer::set ( uint04 index,
uint04 vector_pos,
sint01 value )
inlinefinaloverridevirtual

Sets a sint01 value at a specific vector position within a row.

Parameters
[in]indexThe row index.
[in]vector_posThe component index within the vector.
[in]valueThe value to store.

Implements TableColumn.

Definition at line 330 of file GraphicsBuffer.h.

◆ set() [16/25]

void GraphicsBuffer::set ( uint04 index,
uint04 vector_pos,
sint02 value )
inlinefinaloverridevirtual

Sets a sint02 value at a specific vector position within a row.

Parameters
[in]indexThe row index.
[in]vector_posThe component index within the vector.
[in]valueThe value to store.

Implements TableColumn.

Definition at line 331 of file GraphicsBuffer.h.

◆ set() [17/25]

void GraphicsBuffer::set ( uint04 index,
uint04 vector_pos,
sint04 value )
inlinefinaloverridevirtual

Sets a sint04 value at a specific vector position within a row.

Parameters
[in]indexThe row index.
[in]vector_posThe component index within the vector.
[in]valueThe value to store.

Implements TableColumn.

Definition at line 332 of file GraphicsBuffer.h.

◆ set() [18/25]

void GraphicsBuffer::set ( uint04 index,
uint04 vector_pos,
sint08 value )
inlinefinaloverridevirtual

Sets a sint08 value at a specific vector position within a row.

Parameters
[in]indexThe row index.
[in]vector_posThe component index within the vector.
[in]valueThe value to store.

Implements TableColumn.

Definition at line 333 of file GraphicsBuffer.h.

◆ set() [19/25]

void GraphicsBuffer::set ( uint04 index,
uint04 vector_pos,
uint01 value )
inlinefinaloverridevirtual

Sets a uint01 value at a specific vector position within a row.

Parameters
[in]indexThe row index.
[in]vector_posThe component index within the vector.
[in]valueThe value to store.

Implements TableColumn.

Definition at line 326 of file GraphicsBuffer.h.

◆ set() [20/25]

void GraphicsBuffer::set ( uint04 index,
uint04 vector_pos,
uint02 value )
inlinefinaloverridevirtual

Sets a uint02 value at a specific vector position within a row.

Parameters
[in]indexThe row index.
[in]vector_posThe component index within the vector.
[in]valueThe value to store.

Implements TableColumn.

Definition at line 327 of file GraphicsBuffer.h.

◆ set() [21/25]

void GraphicsBuffer::set ( uint04 index,
uint04 vector_pos,
uint04 value )
inlinefinaloverridevirtual

Sets a uint04 value at a specific vector position within a row.

Parameters
[in]indexThe row index.
[in]vector_posThe component index within the vector.
[in]valueThe value to store.

Implements TableColumn.

Definition at line 328 of file GraphicsBuffer.h.

◆ set() [22/25]

void GraphicsBuffer::set ( uint04 index,
uint04 vector_pos,
uint08 value )
inlinefinaloverridevirtual

Sets a uint08 value at a specific vector position within a row.

Parameters
[in]indexThe row index.
[in]vector_posThe component index within the vector.
[in]valueThe value to store.

Implements TableColumn.

Definition at line 329 of file GraphicsBuffer.h.

◆ set() [23/25]

void GraphicsBuffer::set ( uint04 index,
uint08 value )
inlinefinaloverridevirtual

Sets a uint08 value at the given row index.

Parameters
[in]indexThe row index.
[in]valueThe value to store.

Implements TableColumn.

Definition at line 343 of file GraphicsBuffer.h.

◆ set() [24/25]

void GraphicsBuffer::set ( uint04 index,
const StringView & value )
inlinefinaloverridevirtual

Sets a string value at the given row index.

Parameters
[in]indexThe row index.
[in]valueThe string view to store.

Implements TableColumn.

Definition at line 350 of file GraphicsBuffer.h.

◆ set() [25/25]

void GraphicsBuffer::set ( uint04 index,
uint04 vector_pos,
const StringView & value )
inlinefinaloverridevirtual

Sets a string value at a specific vector position within a row.

Parameters
[in]indexThe row index.
[in]vector_posThe component index within the vector.
[in]valueThe string view to store.

Implements TableColumn.

Definition at line 337 of file GraphicsBuffer.h.

◆ setAccessable()

virtual void GraphicsBuffer::setAccessable ( bool is_accessable,
bool copy_existing )
inlinevirtual

Sets whether the buffer is CPU-accessible.

Parameters
[in]is_accessableWhether CPU access is enabled.
[in]copy_existingWhether 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().

◆ setDefaultValue()

virtual void GraphicsBuffer::setDefaultValue ( const StringAllocatingView & value)
inlineoverridevirtual

Sets the default value for new rows from a string representation.

Parameters
[in]valueThe string representation of the default value.

Implements TableColumn.

Definition at line 93 of file GraphicsBuffer.h.

◆ setType()

void GraphicsBuffer::setType ( const TypeInfo & type)

Sets the element type for this buffer.

Parameters
[in]typeThe new type information.

References type().

Referenced by OpenGLBuffer::copyData().

◆ setUsage()

void GraphicsBuffer::setUsage ( Type type)
inline

Sets the video card usage type for this buffer.

Parameters
[in]typeThe buffer usage type.

Definition at line 104 of file GraphicsBuffer.h.

References m_internal_type, and type().

◆ size()

◆ swap()

virtual void GraphicsBuffer::swap ( uint04 a,
uint04 b )
inlineoverridevirtual

Swaps the values at two row indices.

Parameters
[in]aThe first row index.
[in]bThe second row index.

Implements TableColumn.

Definition at line 405 of file GraphicsBuffer.h.

◆ swapIndices()

virtual void GraphicsBuffer::swapIndices ( uint04 a,
uint04 b )
inlineoverridevirtual

Swaps two index entries.

Used for reordering index-based columns.

Parameters
[in]aThe first index.
[in]bThe second index.

Implements TableColumn.

Definition at line 411 of file GraphicsBuffer.h.

◆ type()

virtual TypeInfo GraphicsBuffer::type ( ) const
inlineoverridevirtual

◆ unmapMemory()

virtual void GraphicsBuffer::unmapMemory ( size_t offset,
size_t size ) const
protectedpure virtual

Unmaps a previously mapped memory region.

Parameters
[in]offsetByte offset that was mapped.
[in]sizeNumber of bytes that were mapped.

Implemented in OpenGLBuffer, and VulkanBuffer.

References size().

Referenced by sendToVideoCard(), and updateRegion().

◆ updateFrom()

virtual void GraphicsBuffer::updateFrom ( const TableColumn & column)
overridevirtual

Synchronizes this buffer from a source TableColumn.

Parameters
[in]columnThe source column.

Reimplemented from TableColumn.

References TableColumn::TableColumn().

◆ updateRegion()

virtual void GraphicsBuffer::updateRegion ( const TableColumn & reference_data,
uint04 offset,
uint04 size )
protectedpure virtual

Updates a subregion of this buffer from a source column.

Parameters
[in]reference_dataThe source column.
[in]offsetStart index in this buffer.
[in]sizeNumber of elements to update.

Implemented in OpenGLBuffer, and VulkanBuffer.

References TableColumn::TableColumn(), begin(), TypeInfo::byte_size, mapMemory(), size(), type(), and unmapMemory().


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