mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-17 22:50:51 +00:00
attempt to handle the byte swapping of screenshots seen on voodoo2s in
windows
This commit is contained in:
parent
b8a9a97c75
commit
b6ad2223d2
2 changed files with 13 additions and 1 deletions
|
@ -264,7 +264,7 @@ QFGL_DONT_NEED (void, glPixelMapfv, (GLenum map, GLint mapsize, const GLfloat *
|
|||
QFGL_DONT_NEED (void, glPixelMapuiv, (GLenum map, GLint mapsize, const GLuint * values));
|
||||
QFGL_DONT_NEED (void, glPixelMapusv, (GLenum map, GLint mapsize, const GLushort * values));
|
||||
QFGL_DONT_NEED (void, glPixelStoref, (GLenum pname, GLfloat param));
|
||||
QFGL_DONT_NEED (void, glPixelStorei, (GLenum pname, GLint param));
|
||||
QFGL_NEED (void, glPixelStorei, (GLenum pname, GLint param));
|
||||
QFGL_DONT_NEED (void, glPixelTransferf, (GLenum pname, GLfloat param));
|
||||
QFGL_DONT_NEED (void, glPixelTransferi, (GLenum pname, GLint param));
|
||||
QFGL_DONT_NEED (void, glPixelZoom, (GLfloat xfactor, GLfloat yfactor));
|
||||
|
|
|
@ -83,6 +83,7 @@ QF_glColorTableEXT qglColorTableEXT = NULL;
|
|||
qboolean is8bit = false;
|
||||
|
||||
cvar_t *gl_multitexture;
|
||||
cvar_t *gl_screenshot_byte_swap;
|
||||
cvar_t *vid_mode;
|
||||
cvar_t *vid_use8bit;
|
||||
|
||||
|
@ -97,6 +98,12 @@ gl_multitexture_f (cvar_t *var)
|
|||
gl_mtex_active = gl_mtex_capable && var->int_val;
|
||||
}
|
||||
|
||||
static void
|
||||
gl_screenshot_byte_swap_f (cvar_t *var)
|
||||
{
|
||||
qfglPixelStorei (GL_PACK_SWAP_BYTES, var->int_val ? GL_TRUE : GL_FALSE);
|
||||
}
|
||||
|
||||
void
|
||||
GL_Common_Init_Cvars (void)
|
||||
{
|
||||
|
@ -105,6 +112,11 @@ GL_Common_Init_Cvars (void)
|
|||
gl_multitexture = Cvar_Get ("gl_multitexture", "0", CVAR_ARCHIVE,
|
||||
gl_multitexture_f, "Use multitexture when "
|
||||
"available");
|
||||
gl_screenshot_byte_swap =
|
||||
Cvar_Get ("gl_screenshot_byte_swap", "0",
|
||||
CVAR_NONE, gl_screenshot_byte_swap_f,
|
||||
"Swap the bytes for gl screenshots. Needed if you get "
|
||||
"screenshots with red and blue swapped.");
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue