33#ifndef DVD_VERTEX_BUFFER_OBJECT_H
34#define DVD_VERTEX_BUFFER_OBJECT_H
106 [[nodiscard]]
U32 getIndex(const
size_t index) const;
Rough around the edges Adapter pattern abstracting the actual rendering API and access to the GPU.
GFXDevice & context() const noexcept
void addIndex(const U32 index)
void modifyTexCoordValue(const U32 index, vec2< F32 > newValue)
bool deserialize(ByteBuffer &dataIn)
static constexpr U32 PRIMITIVE_RESTART_INDEX_L
U32 getIndex(const size_t index) const
void modifyPositionValues(const U32 indexOffset, const vector< vec3< F32 > > &newValues)
size_t getPartitionOffset(const U16 partitionID) const
vec4< U8 > getBoneWeightsPacked(const U32 index) const
void draw(const GenericDrawCommand &command, VDIUserData *data) override
Calculates the appropriate attribute offsets and returns the total size of a vertex for this buffer.
size_t getIndexCount() const noexcept
bool refresh(BufferLock &dataLockOut, BufferLock &indexLockOut)
Returns true if data was updated.
vec4< F32 > getBoneWeights(const U32 index) const
size_t lastPartitionOffset() const
AttributeFlags _useAttribute
const vector< Vertex > & getVertices() const noexcept
static constexpr U16 INVALID_PARTITION_ID
GenericVertexData_ptr _internalGVD
size_t partitionCount() const noexcept
size_t getPartitionIndexCount(const U16 partitionID)
vec2< F32 > getTexCoord(const U32 index) const
void addIndices(const vector< U16 > &indices)
F32 getTangent(const U32 index) const
size_t getVertexCount() const noexcept
void resizeVertexCount(const size_t size, const Vertex &defaultValue)
void fromBuffer(const VertexBuffer &other)
static size_t GetTotalDataSize(const AttributeFlags &usedAttributes)
bool getMinimalData(const vector< Vertex > &dataIn, Byte *dataOut, size_t dataOutBufferLength)
Trim down the Vertex vector to only upload the minimal amount of data to the GPU.
const vec3< F32 > & getPosition(const U32 index) const
void modifyBoneWeights(const U32 index, const FColour4 &weights)
bool serialize(ByteBuffer &dataOut) const
void modifyColourValue(const U32 index, const UColour4 &newValue)
void modifyTangentValue(const U32 index, const vec3< F32 > &newValue)
vec4< U8 > getBoneIndices(const U32 index) const
void reserveIndexCount(const size_t size)
static AttributeOffsets GetAttributeOffsets(const AttributeFlags &usedAttributes, size_t &totalDataSizeOut)
void modifyNormalValue(const U32 index, const vec3< F32 > &newValue)
void setVertexCount(const size_t size)
F32 getNormal(const U32 index) const
const vector< U32 > & getIndices() const noexcept
void modifyBoneIndices(const U32 index, const vec4< U8 > indices)
static constexpr U32 PRIMITIVE_RESTART_INDEX_S
void modifyPositionValue(const U32 index, const vec3< F32 > &newValue)
void resizeVertexCount(const size_t size)
AttributeMap generateAttributeMap()
Activate and set all of the required vertex attributes.
vector< std::pair< size_t, size_t > > _partitions
vector< U32 > _indices
Used for creating an "IB". If it's empty, then an outside source should provide the indices.
Handle console commands that start with a forward slash.
std::array< bool, to_base(AttribLocation::COUNT)> AttributeFlags
eastl::vector< Type > vector
std::array< size_t, to_base(AttribLocation::COUNT)> AttributeOffsets
bool _allowDynamicUpdates