mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2025-02-03 06:20:57 +00:00
SCR_ScreenShot_f: dont bother GL_PACK_ALIGNMENT restoring
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@910 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
parent
72be5368ee
commit
46b1533a41
1 changed files with 1 additions and 3 deletions
|
@ -118,7 +118,6 @@ float scr_disabled_time;
|
||||||
|
|
||||||
int scr_tileclear_updates = 0; //johnfitz
|
int scr_tileclear_updates = 0; //johnfitz
|
||||||
|
|
||||||
static GLint gl_pack_alignment = 4;
|
|
||||||
void SCR_ScreenShot_f (void);
|
void SCR_ScreenShot_f (void);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -426,7 +425,6 @@ void SCR_Init (void)
|
||||||
|
|
||||||
SCR_LoadPics (); //johnfitz
|
SCR_LoadPics (); //johnfitz
|
||||||
|
|
||||||
glGetIntegerv (GL_PACK_ALIGNMENT, &gl_pack_alignment);
|
|
||||||
scr_initialized = true;
|
scr_initialized = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -788,9 +786,9 @@ void SCR_ScreenShot_f (void)
|
||||||
Con_Printf ("SCR_ScreenShot_f: Couldn't allocate memory\n");
|
Con_Printf ("SCR_ScreenShot_f: Couldn't allocate memory\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
glPixelStorei (GL_PACK_ALIGNMENT, 1);/* for widths that aren't a multiple of 4 */
|
glPixelStorei (GL_PACK_ALIGNMENT, 1);/* for widths that aren't a multiple of 4 */
|
||||||
glReadPixels (glx, gly, glwidth, glheight, GL_RGB, GL_UNSIGNED_BYTE, buffer);
|
glReadPixels (glx, gly, glwidth, glheight, GL_RGB, GL_UNSIGNED_BYTE, buffer);
|
||||||
glPixelStorei (GL_PACK_ALIGNMENT, gl_pack_alignment);
|
|
||||||
|
|
||||||
// now write the file
|
// now write the file
|
||||||
if (Image_WriteTGA (tganame, buffer, glwidth, glheight, 24, false))
|
if (Image_WriteTGA (tganame, buffer, glwidth, glheight, 24, false))
|
||||||
|
|
Loading…
Reference in a new issue