Archived
1
Fork 0

Use unsigned integers in more places

This commit is contained in:
Joshua Goins 2022-03-06 19:16:54 -05:00
parent 00193bbae8
commit 0d0a37e315
2 changed files with 12 additions and 11 deletions

View file

@ -84,7 +84,8 @@ public:
GFXBuffer* bone_batrix_buffer = nullptr;
std::vector<Matrix4x4> 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;
};

View file

@ -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;