From f6df1a0115d23514fb9d7e18434e0182c64dc527 Mon Sep 17 00:00:00 2001 From: Taylor Richards Date: Fri, 12 Aug 2005 08:57:20 +0000 Subject: [PATCH] don't show hardware S-RAM value on HUD in debug do show in use GL texture memory have an actual fade effect for the credits screen artwork --- src/freespace2/freespace.cpp | 12 +++++++++++- src/graphics/gropengl.cpp | 18 +++++++++++------- 2 files changed, 22 insertions(+), 8 deletions(-) diff --git a/src/freespace2/freespace.cpp b/src/freespace2/freespace.cpp index a487864..c3c6cac 100644 --- a/src/freespace2/freespace.cpp +++ b/src/freespace2/freespace.cpp @@ -15,6 +15,11 @@ * Freespace main body * * $Log$ + * Revision 1.39 2005/08/12 08:57:20 taylor + * don't show hardware S-RAM value on HUD in debug + * do show in use GL texture memory + * have an actual fade effect for the credits screen artwork + * * Revision 1.38 2004/09/20 01:31:44 theoddone33 * GCC 3.4 fixes. * @@ -2940,10 +2945,10 @@ void game_show_framerate() sy += dy; gr_printf( sx, sy, NOX("S-SRAM: %d KB\n"), Snd_sram/1024 ); // mem used to store game sound sy += dy; +#ifndef PLAT_UNIX gr_printf( sx, sy, NOX("S-HRAM: %d KB\n"), Snd_hram/1024 ); // mem used to store game sound sy += dy; { -#ifndef PLAT_UNIX extern int D3D_textures_in; extern int Glide_textures_in; extern int Glide_textures_in_frame; @@ -2954,6 +2959,11 @@ void game_show_framerate() sy += dy; gr_printf( sx, sy, NOX("EXP VRAM: %dKB\n"), (Glide_explosion_vram)/1024 ); sy += dy; +#else + { + extern int GL_textures_in; + gr_printf( sx, sy, NOX("VRAM: %d KB\n"), (GL_textures_in)/1024 ); + sy += dy; #endif } } diff --git a/src/graphics/gropengl.cpp b/src/graphics/gropengl.cpp index f73a011..f2441e9 100644 --- a/src/graphics/gropengl.cpp +++ b/src/graphics/gropengl.cpp @@ -15,6 +15,11 @@ * Code that uses the OpenGL graphics library * * $Log$ + * Revision 1.74 2005/08/12 08:57:20 taylor + * don't show hardware S-RAM value on HUD in debug + * do show in use GL texture memory + * have an actual fade effect for the credits screen artwork + * * Revision 1.73 2005/04/02 18:58:08 taylor * attempt to fix garbage at end of GL extension string * @@ -1746,13 +1751,11 @@ void gr_opengl_filter_set(int filter) // cross fade void gr_opengl_cross_fade(int bmap1, int bmap2, int x1, int y1, int x2, int y2, float pct) { - if ( pct <= 50 ) { - gr_set_bitmap(bmap1, GR_ALPHABLEND_NONE, GR_BITBLT_MODE_NORMAL, 1.0f, -1, -1); - gr_bitmap(x1, y1); - } else { - gr_set_bitmap(bmap2, GR_ALPHABLEND_NONE, GR_BITBLT_MODE_NORMAL, 1.0f, -1, -1); - gr_bitmap(x2, y2); - } + gr_set_bitmap(bmap1, GR_ALPHABLEND_FILTER, GR_BITBLT_MODE_NORMAL, 1.0f - pct ); + gr_bitmap(x1, y1); + + gr_set_bitmap(bmap2, GR_ALPHABLEND_FILTER, GR_BITBLT_MODE_NORMAL, pct ); + gr_bitmap(x2, y2); } @@ -2048,6 +2051,7 @@ static int opengl_free_texture ( tcache_slot_opengl *t ) t->bitmap_id = -1; t->used_this_frame = 0; GL_textures_in -= t->size; + t->size = 0; } return 1; -- 2.39.2