Up max index count to 4 gigs
This commit is contained in:
parent
676127c41f
commit
69f355eae4
2
src/k3.c
2
src/k3.c
@ -283,7 +283,7 @@ void k3MdlUpdateNrm(struct k3Mdl *mdl, uint8_t *nrm) {
|
|||||||
glBufferSubDataARB(GL_ARRAY_BUFFER_ARB, mdl->offN, 3 * mdl->verts, 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));
|
mdl->meshes = realloc(mdl->meshes, sizeof(*mdl->meshes) * (mdl->meshCount + 1));
|
||||||
struct k3Mesh *mehs = &mdl->meshes[mdl->meshCount++];
|
struct k3Mesh *mehs = &mdl->meshes[mdl->meshCount++];
|
||||||
mehs->idxStart = idxStart;
|
mehs->idxStart = idxStart;
|
||||||
|
4
src/k3.h
4
src/k3.h
@ -146,7 +146,7 @@ struct k3Light {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct k3Mesh {
|
struct k3Mesh {
|
||||||
uint16_t idxStart, idxNumber;
|
uint32_t idxStart, idxNumber;
|
||||||
struct k3Mat mat;
|
struct k3Mat mat;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -159,7 +159,7 @@ void k3StorageUnref(struct k3Storage*);
|
|||||||
struct k3Mdl;
|
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);
|
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 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);
|
struct k3Mesh *k3MdlGetMeshes(struct k3Mdl*, size_t *count);
|
||||||
void k3MdlAddAnim(struct k3Mdl*, struct k3AnimationFountain*);
|
void k3MdlAddAnim(struct k3Mdl*, struct k3AnimationFountain*);
|
||||||
struct k3AnimationFountain *k3MdlGetAnim(struct k3Mdl*, uint16_t id);
|
struct k3AnimationFountain *k3MdlGetAnim(struct k3Mdl*, uint16_t id);
|
||||||
|
Loading…
Reference in New Issue
Block a user