fixed simple draw_cursor
[retroray] / src / app.c
index 9db63b0..6f7e250 100644 (file)
--- a/src/app.c
+++ b/src/app.c
@@ -52,6 +52,7 @@ struct font *uifont;
 
 uint32_t *framebuf;
 
+struct scene *scn;
 
 /* available screens */
 #define MAX_SCREENS    8
@@ -65,8 +66,6 @@ int app_init(void)
        char *start_scr_name;
        static rtk_draw_ops guigfx = {gui_fill, gui_blit, gui_drawtext, gui_textrect};
 
-       init_logger();
-
 #if !defined(NDEBUG) && defined(DBG_FPEXCEPT)
        printf("floating point exceptions enabled\n");
        enable_fpexcept();
@@ -93,6 +92,10 @@ int app_init(void)
 
        rtk_setup(&guigfx);
 
+       if(!(scn = create_scene())) {
+               return -1;
+       }
+
        /* initialize screens */
        screens[num_screens++] = &scr_model;
        screens[num_screens++] = &scr_rend;
@@ -141,6 +144,8 @@ void app_shutdown(void)
        gaw_sw_destroy();
 #endif
 
+       free_scene(scn);
+
        cleanup_logger();
 }
 
@@ -149,8 +154,6 @@ void app_display(void)
        time_msec = app_getmsec();
 
        cur_scr->display();
-
-       app_swap_buffers();
 }
 
 void app_reshape(int x, int y)