smash textures on every resolution change, use kludge to avoid repetitive res changes

This commit is contained in:
Bradley Bell 2003-11-06 08:58:53 +00:00
parent 7fce8f6a97
commit a36444494c
3 changed files with 12 additions and 2 deletions

View file

@ -1,3 +1,8 @@
2003-11-06 Bradley Bell <btb@icculus.org>
* arch/ogl/gr.c, arch/ogl/sdlgl.c: smash textures on every
resolution change, use kludge to avoid repetitive res changes
2003-11-04 Bradley Bell <btb@icculus.org>
* main/piggy.c, main/piggy.h: moved bitmap and sound header data

View file

@ -1,4 +1,4 @@
/* $Id: gr.c,v 1.13 2003-04-11 23:51:48 btb Exp $ */
/* $Id: gr.c,v 1.14 2003-11-06 08:58:53 btb Exp $ */
/*
*
* OGL video functions. - Added 9/15/99 Matthew Mueller
@ -230,6 +230,8 @@ void ogl_get_verinfo(void){
con_printf(CON_VERBOSE, "gl_intensity4:%i gl_luminance4_alpha4:%i gl_rgba2:%i gl_readpixels:%i gl_gettexlevelparam:%i\n",ogl_intensity4_ok,ogl_luminance4_alpha4_ok,ogl_rgba2_ok,ogl_readpixels_ok,ogl_gettexlevelparam_ok);
}
extern int VGA_current_mode; // DPH: kludge - remove at all costs
int gr_set_mode(u_int32_t mode)
{
unsigned int w,h;
@ -244,6 +246,7 @@ return 0;
w=SM_W(mode);
h=SM_H(mode);
VGA_current_mode = mode;
//if (screen != NULL) gr_palette_clear();

View file

@ -1,4 +1,4 @@
/* $Id: sdlgl.c,v 1.6 2003-03-28 09:27:07 btb Exp $ */
/* $Id: sdlgl.c,v 1.7 2003-11-06 08:58:53 btb Exp $ */
/*
*
* Graphics functions for SDL-GL.
@ -35,7 +35,9 @@ int ogl_init_window(int x, int y){
if (gl_initialized){
if (x==curx && y==cury && curfull==ogl_fullscreen)
return 0;
#ifndef __linux__ // Windows, at least, seems to need to reload every time.
if (ogl_fullscreen || curfull)
#endif
ogl_smash_texture_list_internal();//if we are or were fullscreen, changing vid mode will invalidate current textures
}
SDL_WM_SetCaption(DESCENT_VERSION, "Descent II");