refactor pt 1; getting each thing right and then will push to main

This commit is contained in:
2025-09-19 17:57:48 -04:00
parent 9a6810d1bb
commit dbb6d13f34
37 changed files with 7313 additions and 8950 deletions

View File

@@ -1,17 +1,15 @@
#include "resources.h"
void resources_init(Resources* self)
{
texture_from_encoded_data_init(&self->atlas, TEXTURE_ATLAS_SIZE, (u8*)TEXTURE_ATLAS, TEXTURE_ATLAS_LENGTH);
for (s32 i = 0; i < SHADER_COUNT; i++)
shader_init(&self->shaders[i], SHADER_DATA[i].vertex, SHADER_DATA[i].fragment);
void resources_init(Resources* self) {
texture_from_path_init(&self->atlas, ATLAS_PATH);
for (int i = 0; i < SHADER_COUNT; i++)
shader_init(&self->shaders[i], SHADER_DATA[i].vertex, SHADER_DATA[i].fragment);
}
void resources_free(Resources* self)
{
for (auto& shader : self->shaders)
shader_free(&shader);
void resources_free(Resources* self) {
for (auto& shader : self->shaders)
shader_free(&shader);
texture_free(&self->atlas);
texture_free(&self->atlas);
}