test/snake/snake.c

changeset 110
29f8d0d586f8
parent 108
d619bf7dd87b
--- a/test/snake/snake.c	Sun May 04 21:50:13 2025 +0200
+++ b/test/snake/snake.c	Mon May 05 19:47:25 2025 +0200
@@ -42,7 +42,7 @@
 #define BACKDROP_SCENE asc_window_scene(0)
 #define MAIN_SCENE asc_window_scene(1)
 
-static void destroy_textures(__attribute__((__unused__)) void *dummy) {
+static void destroy_textures(void) {
     asc_texture_destroy(tex2d, TEX2D_COUNT);
 }
 
@@ -50,7 +50,7 @@
     asc_texture_init_2d(tex2d, TEX2D_COUNT);
     asc_texture_from_file(TEXTURE_SHIP, "ship.png");
     asc_texture_from_file(TEXTURE_BACKDROP, "backdrop.png");
-    cxMempoolRegister(asc_active_glctx_mpool, tex2d, destroy_textures);
+    asc_gl_context_add_cleanup_func(asc_active_glctx, destroy_textures);
 }
 
 static void update_fps_counter(AscBehavior *behavior) {

mercurial