Skip to content

Commit

Permalink
Added 'offset' parameter to templated cmdPushConstants()
Browse files Browse the repository at this point in the history
  • Loading branch information
corporateshark committed Feb 14, 2024
1 parent 3909c1e commit d636276
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lvk/LVK.h
Original file line number Diff line number Diff line change
Expand Up @@ -774,8 +774,8 @@ class ICommandBuffer {
virtual void cmdBindIndexBuffer(BufferHandle indexBuffer, IndexFormat indexFormat, uint64_t indexBufferOffset = 0) = 0;
virtual void cmdPushConstants(const void* data, size_t size, size_t offset = 0) = 0;
template<typename Struct>
void cmdPushConstants(const Struct& data) {
this->cmdPushConstants(&data, sizeof(Struct), 0);
void cmdPushConstants(const Struct& data, size_t offset = 0) {
this->cmdPushConstants(&data, sizeof(Struct), offset);
}

virtual void cmdDraw(uint32_t vertexCount, uint32_t instanceCount = 1, uint32_t firstVertex = 0, uint32_t baseInstance = 0) = 0;
Expand Down

0 comments on commit d636276

Please sign in to comment.