Use unsigned integers in more places
This commit is contained in:
parent
00193bbae8
commit
0d0a37e315
2 changed files with 12 additions and 11 deletions
|
@ -84,7 +84,8 @@ public:
|
||||||
GFXBuffer* bone_batrix_buffer = nullptr;
|
GFXBuffer* bone_batrix_buffer = nullptr;
|
||||||
std::vector<Matrix4x4> offset_matrices;
|
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;
|
int32_t material_override = -1;
|
||||||
std::string material_hint;
|
std::string material_hint;
|
||||||
};
|
};
|
||||||
|
|
|
@ -112,17 +112,17 @@ struct GFXDrawCommand {
|
||||||
} bind_sampler;
|
} bind_sampler;
|
||||||
|
|
||||||
struct DrawData {
|
struct DrawData {
|
||||||
int vertex_offset = 0;
|
uint32_t vertex_offset = 0;
|
||||||
int vertex_count = 0;
|
uint32_t vertex_count = 0;
|
||||||
int base_instance = 0;
|
uint32_t base_instance = 0;
|
||||||
int instance_count = 0;
|
uint32_t instance_count = 0;
|
||||||
} draw;
|
} draw;
|
||||||
|
|
||||||
struct DrawIndexedData {
|
struct DrawIndexedData {
|
||||||
int index_count = 0;
|
uint32_t index_count = 0;
|
||||||
int first_index = 0;
|
uint32_t first_index = 0;
|
||||||
int vertex_offset = 0;
|
int32_t vertex_offset = 0;
|
||||||
int base_instance = 0;
|
uint32_t base_instance = 0;
|
||||||
} draw_indexed;
|
} draw_indexed;
|
||||||
|
|
||||||
struct CopyTextureData {
|
struct CopyTextureData {
|
||||||
|
@ -252,7 +252,7 @@ public:
|
||||||
commands.push_back(command);
|
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;
|
GFXDrawCommand command;
|
||||||
command.type = GFXCommandType::Draw;
|
command.type = GFXCommandType::Draw;
|
||||||
command.data.draw.vertex_offset = offset;
|
command.data.draw.vertex_offset = offset;
|
||||||
|
@ -263,7 +263,7 @@ public:
|
||||||
commands.push_back(command);
|
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;
|
GFXDrawCommand command;
|
||||||
command.type = GFXCommandType::DrawIndexed;
|
command.type = GFXCommandType::DrawIndexed;
|
||||||
command.data.draw_indexed.vertex_offset = vertexOffset;
|
command.data.draw_indexed.vertex_offset = vertexOffset;
|
||||||
|
|
Reference in a new issue