Smash texture list when switching between window mode and fullscreen prevent invalid textures; Made code to capture Screenshots more similar between OpenGL and OpenGL ES
This commit is contained in:
parent
fa14dbe28e
commit
025f04c389
|
@ -4,7 +4,7 @@ D2X-Rebirth Changelog
|
||||||
--------
|
--------
|
||||||
main/collide.c, main/laser.c, main/laser.h, main/object.c, main/object.h, main/vclip.c: Reworked Omega cannon: Instead of firing every frame, fire in 33.33ms intervals instead which will improve performance, decrease network traffic and make damage in Multiplayer not a totally random factor; To compensate inaccuracy due high velocity of leading omega blob, check for it's distance from parent and delete if distance > MAX
|
main/collide.c, main/laser.c, main/laser.h, main/object.c, main/object.h, main/vclip.c: Reworked Omega cannon: Instead of firing every frame, fire in 33.33ms intervals instead which will improve performance, decrease network traffic and make damage in Multiplayer not a totally random factor; To compensate inaccuracy due high velocity of leading omega blob, check for it's distance from parent and delete if distance > MAX
|
||||||
main/gamerend.c, main/gauges.c, main/titles.c: Fixed text-related annoyances: Fixed positions of strings TXT_CLOAKED and TXT_CRUISE in CM_FULL_SCREEN; Fixed scaling of tab_stop in briefings (again)
|
main/gamerend.c, main/gauges.c, main/titles.c: Fixed text-related annoyances: Fixed positions of strings TXT_CLOAKED and TXT_CRUISE in CM_FULL_SCREEN; Fixed scaling of tab_stop in briefings (again)
|
||||||
INSTALL.txt: Tell people about The Unarchiver for installing from the Mac game CD (thanks, Jonathan!)
|
arch/ogl/gr.c: Smash texture list when switching between window mode and fullscreen prevent invalid textures; Made code to capture Screenshots more similar between OpenGL and OpenGL ES
|
||||||
|
|
||||||
20110408
|
20110408
|
||||||
--------
|
--------
|
||||||
|
|
|
@ -233,6 +233,7 @@ int gr_toggle_fullscreen(void)
|
||||||
glLoadIdentity();//clear matrix
|
glLoadIdentity();//clear matrix
|
||||||
glEnable(GL_BLEND);
|
glEnable(GL_BLEND);
|
||||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||||
|
ogl_smash_texture_list_internal();//if we are or were fullscreen, changing vid mode will invalidate current textures
|
||||||
}
|
}
|
||||||
GameCfg.WindowMode = (sdl_video_flags & SDL_FULLSCREEN)?0:1;
|
GameCfg.WindowMode = (sdl_video_flags & SDL_FULLSCREEN)?0:1;
|
||||||
return (sdl_video_flags & SDL_FULLSCREEN)?1:0;
|
return (sdl_video_flags & SDL_FULLSCREEN)?1:0;
|
||||||
|
@ -745,14 +746,11 @@ void write_bmp(char *savename,int w,int h,unsigned char *buf)
|
||||||
PHYSFS_file* TGAFile;
|
PHYSFS_file* TGAFile;
|
||||||
TGA_header TGA;
|
TGA_header TGA;
|
||||||
GLbyte HeightH,HeightL,WidthH,WidthL;
|
GLbyte HeightH,HeightL,WidthH,WidthL;
|
||||||
#ifdef OGLES
|
|
||||||
unsigned int pixel;
|
unsigned int pixel;
|
||||||
unsigned char *rgbaBuf;
|
unsigned char *rgbaBuf;
|
||||||
#endif
|
|
||||||
|
|
||||||
buf = (unsigned char*)d_calloc(w*h*3,sizeof(unsigned char));
|
buf = (unsigned char*)d_calloc(w*h*4,sizeof(unsigned char));
|
||||||
|
|
||||||
#ifdef OGLES
|
|
||||||
rgbaBuf = (unsigned char*) d_calloc(w * h * 4, sizeof(unsigned char));
|
rgbaBuf = (unsigned char*) d_calloc(w * h * 4, sizeof(unsigned char));
|
||||||
glReadPixels(0, 0, w, h, GL_RGBA, GL_UNSIGNED_BYTE, rgbaBuf);
|
glReadPixels(0, 0, w, h, GL_RGBA, GL_UNSIGNED_BYTE, rgbaBuf);
|
||||||
for(pixel = 0; pixel < w * h; pixel++) {
|
for(pixel = 0; pixel < w * h; pixel++) {
|
||||||
|
@ -761,9 +759,6 @@ void write_bmp(char *savename,int w,int h,unsigned char *buf)
|
||||||
*(buf + pixel * 3 + 2) = *(rgbaBuf + pixel * 4);
|
*(buf + pixel * 3 + 2) = *(rgbaBuf + pixel * 4);
|
||||||
}
|
}
|
||||||
d_free(rgbaBuf);
|
d_free(rgbaBuf);
|
||||||
#else
|
|
||||||
glReadPixels(0,0,w,h,GL_BGR_EXT,GL_UNSIGNED_BYTE,buf);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (!(TGAFile = PHYSFSX_openWriteBuffered(savename)))
|
if (!(TGAFile = PHYSFSX_openWriteBuffered(savename)))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue