From cdc5f26900dc10e10679ba76a30f195e8b3f5505 Mon Sep 17 00:00:00 2001 From: Magnus Auvinen Date: Sun, 7 Jun 2009 14:36:54 +0000 Subject: new font rendering system using freetype2. only compiles under linux for now --- src/game/client/components/menus.cpp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'src/game/client/components/menus.cpp') diff --git a/src/game/client/components/menus.cpp b/src/game/client/components/menus.cpp index 54c587ef..53b57e2c 100644 --- a/src/game/client/components/menus.cpp +++ b/src/game/client/components/menus.cpp @@ -13,10 +13,6 @@ #include -extern "C" { - #include -} - #include #include @@ -603,6 +599,15 @@ int MENUS::render_menubar(RECT r) void MENUS::render_loading(float percent) { + static int64 last_load_render = 0; + + // make sure that we don't render for each little thing we load + // because that will slow down loading if we have vsync + if(time_get()-last_load_render < time_freq()/60) + return; + + last_load_render = time_get(); + // need up date this here to get correct vec3 rgb = hsl_to_rgb(vec3(config.ui_color_hue/255.0f, config.ui_color_sat/255.0f, config.ui_color_lht/255.0f)); gui_color = vec4(rgb.r, rgb.g, rgb.b, config.ui_color_alpha/255.0f); @@ -994,6 +999,8 @@ void MENUS::on_statechange(int new_state, int old_state) } } +extern "C" void font_debug_render(); + void MENUS::on_render() { if(client_state() != CLIENTSTATE_ONLINE && client_state() != CLIENTSTATE_DEMOPLAYBACK) -- cgit 1.4.1