Up max index count to 4 gigs

This commit is contained in:
Mid 2025-09-30 11:03:49 +03:00
parent 676127c41f
commit 69f355eae4
2 changed files with 3 additions and 3 deletions

View File

@ -283,7 +283,7 @@ void k3MdlUpdateNrm(struct k3Mdl *mdl, uint8_t *nrm) {
glBufferSubDataARB(GL_ARRAY_BUFFER_ARB, mdl->offN, 3 * mdl->verts, nrm);
}
void k3MdlAddMesh(struct k3Mdl *mdl, struct k3Mat *mat, uint16_t idxStart, uint16_t idxNumber) {
void k3MdlAddMesh(struct k3Mdl *mdl, struct k3Mat *mat, uint32_t idxStart, uint32_t idxNumber) {
mdl->meshes = realloc(mdl->meshes, sizeof(*mdl->meshes) * (mdl->meshCount + 1));
struct k3Mesh *mehs = &mdl->meshes[mdl->meshCount++];
mehs->idxStart = idxStart;

View File

@ -146,7 +146,7 @@ struct k3Light {
};
struct k3Mesh {
uint16_t idxStart, idxNumber;
uint32_t idxStart, idxNumber;
struct k3Mat mat;
};
@ -159,7 +159,7 @@ void k3StorageUnref(struct k3Storage*);
struct k3Mdl;
struct k3Mdl *k3MdlCreate(size_t verts, size_t indices, size_t boneCount, vec3 *pos, uint8_t *nrm, float *uvs, uint8_t *cols, uint8_t *boneids, uint16_t *boneweights, uint16_t *inds, mat4 *invBind, uint8_t *boneParents);
void k3MdlUpdatePos(struct k3Mdl *mdl, vec3 *pos);
void k3MdlAddMesh(struct k3Mdl*, struct k3Mat*, uint16_t idxStart, uint16_t idxNumber);
void k3MdlAddMesh(struct k3Mdl*, struct k3Mat*, uint32_t idxStart, uint32_t idxNumber);
struct k3Mesh *k3MdlGetMeshes(struct k3Mdl*, size_t *count);
void k3MdlAddAnim(struct k3Mdl*, struct k3AnimationFountain*);
struct k3AnimationFountain *k3MdlGetAnim(struct k3Mdl*, uint16_t id);