generalization of deferred commands and any_gl rendering where appropriate

This commit is contained in:
veclavtalica
2025-01-03 21:01:26 +03:00
parent edcb7fc39c
commit 33471b4c46
8 changed files with 347 additions and 321 deletions

View File

@ -2,6 +2,7 @@
#include "twn_draw_c.h"
#include <SDL2/SDL.h>
#include <stb_ds.h>
static char *paths_in_use;
@ -21,6 +22,14 @@ void render_skybox(void) {
return;
/* note: ownership of 'paths_in_use' goes there */
finally_render_skybox(paths_in_use);
DeferredCommand command = {
.type = DEFERRED_COMMAND_TYPE_DRAW_SKYBOX,
.draw_skybox = (DeferredCommandDrawSkybox){
.paths = paths_in_use
}
};
arrpush(deferred_commands, command);
paths_in_use = NULL;
}