Fixed ent shader not updating.

This commit is contained in:
2025-03-02 19:43:38 -06:00
parent 7c150a9a7c
commit 3e799eb648
6 changed files with 8 additions and 13 deletions

View File

@ -19,9 +19,6 @@ void entitiesInit() {
}
void entitiesUpdate() {
shaderBufferBind(&ENTITIES_BUFFER);
shaderBufferSetData(&ENTITIES_BUFFER, &OVERWORLD);
for(uint8_t i = 0; i < OVERWORLD.entityCount; i++) {
// Pack the entity data into the buffer
entity_t *src = &OVERWORLD.entities[i];
@ -35,6 +32,9 @@ void entitiesUpdate() {
sizeof(uint_t)
);
}
shaderBufferBind(&ENTITIES_BUFFER);
shaderBufferSetData(&ENTITIES_BUFFER, &OVERWORLD);
}
void entitiesDispose() {

View File

@ -9,7 +9,7 @@
struct Entity {
uint position;
uvec3 _padding0;
uvec3 _p0;
};
layout(std140) uniform b_Entities {

View File

@ -13,7 +13,7 @@
typedef struct {
uint_t position;
uvec3_t _padding0;
uvec3_t _p0;
} entitiesdataent_t;
typedef struct {