surface props
[carveJwlIkooP6JGAAIwe30JlM.git] / menu.h
diff --git a/menu.h b/menu.h
index 02ab25242a74c75837f862f20eb51fb6a230bf7b..21fa313e5edc9e6613c23ca64ad39c595969bd80 100644 (file)
--- a/menu.h
+++ b/menu.h
@@ -17,14 +17,16 @@ VG_STATIC float       menu_fov_target = 97.0f;
 VG_STATIC v2f         menu_extra_angles;
 
 VG_STATIC int         menu_loc = 1,
-                   menu_loc_last = 1;
+                      menu_loc_last = 1;
 VG_STATIC u32         menu_page     = 0;
 
 VG_STATIC int         cl_menu         = 0,
-                   cl_menu_go_away = 0;
+                      cl_menu_go_away = 0;
 
 VG_STATIC const char *playermodels[] = { "ch_new", "ch_jordan", "ch_outlaw" };
 
+vg_tex2d tex_menu = { .path = "textures/menu.qoi",.flags = VG_TEXTURE_NEAREST };
+
 VG_STATIC void menu_btn_paused( int event );
 VG_STATIC void menu_btn_quit( int event );
 VG_STATIC void menu_btn_skater( int event );
@@ -104,7 +106,10 @@ VG_STATIC void menu_init(void)
    mdl_close( &menu_model );
 
    vg_acquire_thread_sync();
-   mdl_unpack_glmesh( &menu_model, &menu_glmesh );
+   {
+      mdl_unpack_glmesh( &menu_model, &menu_glmesh );
+      vg_tex2d_init( (vg_tex2d *[]){ &tex_menu }, 1 );
+   }
    vg_release_thread_sync();
 
    for( int i=0; i<vg_list_size(menu_buttons); i++ )
@@ -386,7 +391,7 @@ VG_STATIC void menu_render( m4x4f projection )
    shader_menu_use();
    shader_menu_uColour( (v4f){ 1.0f,1.0f,1.0f,1.0f} );
    shader_menu_uTexMain( 1 );
-   vg_tex2d_bind( &tex_graffiti, 1 );
+   vg_tex2d_bind( &tex_menu, 1 );
 
    shader_menu_uPv( projection );
    mesh_bind( &menu_glmesh );