diff --git a/engine/asset/include/asset_types.hpp b/engine/asset/include/asset_types.hpp index 70e2401..7cd6811 100644 --- a/engine/asset/include/asset_types.hpp +++ b/engine/asset/include/asset_types.hpp @@ -84,7 +84,8 @@ public: GFXBuffer* bone_batrix_buffer = nullptr; std::vector offset_matrices; - uint32_t index_offset = 0, vertex_offset = 0, index_count = 0; + uint32_t index_offset = 0, index_count = 0;; + int32_t vertex_offset = 0; int32_t material_override = -1; std::string material_hint; }; diff --git a/engine/gfx/public/gfx_commandbuffer.hpp b/engine/gfx/public/gfx_commandbuffer.hpp index ad8f6b1..dd47092 100755 --- a/engine/gfx/public/gfx_commandbuffer.hpp +++ b/engine/gfx/public/gfx_commandbuffer.hpp @@ -112,17 +112,17 @@ struct GFXDrawCommand { } bind_sampler; struct DrawData { - int vertex_offset = 0; - int vertex_count = 0; - int base_instance = 0; - int instance_count = 0; + uint32_t vertex_offset = 0; + uint32_t vertex_count = 0; + uint32_t base_instance = 0; + uint32_t instance_count = 0; } draw; struct DrawIndexedData { - int index_count = 0; - int first_index = 0; - int vertex_offset = 0; - int base_instance = 0; + uint32_t index_count = 0; + uint32_t first_index = 0; + int32_t vertex_offset = 0; + uint32_t base_instance = 0; } draw_indexed; struct CopyTextureData { @@ -252,7 +252,7 @@ public: commands.push_back(command); } - void draw(int offset, int count, int instance_base, int instance_count) { + void draw(const uint32_t offset, const uint32_t count, const uint32_t instance_base, const uint32_t instance_count) { GFXDrawCommand command; command.type = GFXCommandType::Draw; command.data.draw.vertex_offset = offset; @@ -263,7 +263,7 @@ public: commands.push_back(command); } - void draw_indexed(int indexCount, int firstIndex, int vertexOffset, int base_instance) { + void draw_indexed(const uint32_t indexCount, const uint32_t firstIndex, const int32_t vertexOffset, const uint32_t base_instance) { GFXDrawCommand command; command.type = GFXCommandType::DrawIndexed; command.data.draw_indexed.vertex_offset = vertexOffset;