summaryrefslogtreecommitdiff
path: root/src/game.cpp
diff options
context:
space:
mode:
authoraura <nw@moneybot.cc>2026-03-10 05:18:33 +0100
committeraura <nw@moneybot.cc>2026-03-10 05:18:33 +0100
commit30151d75dddd651faa1b27148a052ced7d0f190a (patch)
tree30b9374d59ecdd83296f7a2b7aa008340b95daf5 /src/game.cpp
parent31b77ed2e0c037e5718b9ecd06d3941600cc8815 (diff)
2d batch rendering
Diffstat (limited to 'src/game.cpp')
-rw-r--r--src/game.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/game.cpp b/src/game.cpp
index a0452db..092da55 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -58,6 +58,7 @@ GAME_DATA* game_init( GL_DATA* gl ) {
}
void game_create_batches( GAME_DATA *game ) {
+ game->render.batch_2d = gl_batch_create( game->gl, game->shaders.gl2d, &gl_2d_batch_setup );
game->render.batch_3d = gl_batch_create( game->gl, game->shaders.gl3d, &gl_3d_batch_setup );
}
@@ -222,5 +223,7 @@ void game_on_tick( GAME_DATA* game ) { _profiled
}
void game_destroy( GAME_DATA *game ) {
+ gl_batch_destroy( game->render.batch_2d );
+ gl_batch_destroy( game->render.batch_3d );
free( game );
}