From 46b1533a41c59acb68f5fabd8ef914581bcf69e1 Mon Sep 17 00:00:00 2001 From: Ozkan Sezer Date: Mon, 28 Apr 2014 20:10:34 +0000 Subject: [PATCH] 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 --- Quake/gl_screen.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Quake/gl_screen.c b/Quake/gl_screen.c index ce887032..4d0ed4d9 100644 --- a/Quake/gl_screen.c +++ b/Quake/gl_screen.c @@ -118,7 +118,6 @@ float scr_disabled_time; int scr_tileclear_updates = 0; //johnfitz -static GLint gl_pack_alignment = 4; void SCR_ScreenShot_f (void); /* @@ -426,7 +425,6 @@ void SCR_Init (void) SCR_LoadPics (); //johnfitz - glGetIntegerv (GL_PACK_ALIGNMENT, &gl_pack_alignment); scr_initialized = true; } @@ -788,9 +786,9 @@ void SCR_ScreenShot_f (void) Con_Printf ("SCR_ScreenShot_f: Couldn't allocate memory\n"); return; } + 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); - glPixelStorei (GL_PACK_ALIGNMENT, gl_pack_alignment); // now write the file if (Image_WriteTGA (tganame, buffer, glwidth, glheight, 24, false))