use the same allocator everywhere behind pxl8 calls

This commit is contained in:
asrael 2026-01-23 12:26:59 -06:00
parent f18652dc97
commit fe747969a5
45 changed files with 687 additions and 627 deletions

View file

@ -4,9 +4,10 @@
#include <string.h>
#include "pxl8_gfx.h"
#include "pxl8_mem.h"
pxl8_gui_state* pxl8_gui_state_create(void) {
pxl8_gui_state* state = (pxl8_gui_state*)malloc(sizeof(pxl8_gui_state));
pxl8_gui_state* state = (pxl8_gui_state*)pxl8_malloc(sizeof(pxl8_gui_state));
if (!state) return NULL;
memset(state, 0, sizeof(pxl8_gui_state));
@ -15,7 +16,7 @@ pxl8_gui_state* pxl8_gui_state_create(void) {
void pxl8_gui_state_destroy(pxl8_gui_state* state) {
if (!state) return;
free(state);
pxl8_free(state);
}
void pxl8_gui_begin_frame(pxl8_gui_state* state, pxl8_gfx* gfx) {