Check this diff and revert it if you can find any purpose of vid_gamma and the pow()-calls with exponent 1.0 being in the code.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@2604 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
bb7975a47a
commit
8c4253ec8c
7 changed files with 2 additions and 16 deletions
|
@ -3477,8 +3477,7 @@ int CM_GetQ2Palette (void)
|
|||
|
||||
#if defined(RGLQUAKE) || defined(D3DQUAKE)
|
||||
{
|
||||
extern float vid_gamma;
|
||||
float f, inf;
|
||||
float inf;
|
||||
qbyte palette[768];
|
||||
qbyte *pal;
|
||||
int i;
|
||||
|
@ -3487,8 +3486,7 @@ int CM_GetQ2Palette (void)
|
|||
|
||||
for (i=0 ; i<768 ; i++)
|
||||
{
|
||||
f = pow ( (pal[i]+1)/256.0 , vid_gamma );
|
||||
inf = f*255 + 0.5;
|
||||
inf = ((pal[i]+1)/256.0)*255 + 0.5;
|
||||
if (inf < 0)
|
||||
inf = 0;
|
||||
if (inf > 255)
|
||||
|
|
|
@ -1068,7 +1068,6 @@ index_t d3d9quadindexes[6] = {
|
|||
};
|
||||
|
||||
extern cvar_t gl_contrast;
|
||||
float vid_gamma = 1.0;
|
||||
float f;
|
||||
unsigned int colour;
|
||||
|
||||
|
@ -1080,8 +1079,6 @@ extern cvar_t gl_contrast;
|
|||
f = gl_contrast.value;
|
||||
f = min (f, 3);
|
||||
|
||||
f = pow (f, vid_gamma);
|
||||
|
||||
IDirect3DDevice9_SetTexture (pD3DDev9, 0, NULL);
|
||||
IDirect3DDevice9_SetRenderState(pD3DDev9, D3DRS_ALPHABLENDENABLE, TRUE);
|
||||
IDirect3DDevice9_SetRenderState(pD3DDev9, D3DRS_SRCBLEND, D3DBLEND_DESTCOLOR);
|
||||
|
|
|
@ -819,7 +819,6 @@ void R_PolyBlend (void)
|
|||
|
||||
void GLR_BrightenScreen (void)
|
||||
{
|
||||
extern float vid_gamma;
|
||||
float f;
|
||||
|
||||
RSpeedMark();
|
||||
|
@ -830,8 +829,6 @@ void GLR_BrightenScreen (void)
|
|||
f = gl_contrast.value;
|
||||
f = min (f, 3);
|
||||
|
||||
f = pow (f, vid_gamma);
|
||||
|
||||
qglDisable (GL_TEXTURE_2D);
|
||||
qglEnable (GL_BLEND);
|
||||
qglBlendFunc (GL_DST_COLOR, GL_ONE);
|
||||
|
|
|
@ -113,7 +113,6 @@ const char *gl_extensions;
|
|||
|
||||
qboolean is8bit = false;
|
||||
qboolean isPermedia = false;
|
||||
float vid_gamma = 1.0;
|
||||
qboolean mouseactive = false;
|
||||
qboolean ActiveApp = false;
|
||||
|
||||
|
|
|
@ -28,8 +28,6 @@ struct Library *TinyGLBase = 0;
|
|||
GLContext *__tglContext;
|
||||
static int glctx = 0;
|
||||
|
||||
float vid_gamma = 1.0;
|
||||
|
||||
unsigned char *mosgammatable;
|
||||
|
||||
struct Window *window;
|
||||
|
|
|
@ -106,8 +106,6 @@ HWND mainwindow, dibwindow;
|
|||
|
||||
unsigned char vid_curpal[256*3];
|
||||
|
||||
float vid_gamma = 1.0;
|
||||
|
||||
HGLRC baseRC;
|
||||
HDC maindc;
|
||||
|
||||
|
|
|
@ -11,7 +11,6 @@ extern int gammaworks;
|
|||
|
||||
int glwidth;
|
||||
int glheight;
|
||||
float vid_gamma = 1.0;
|
||||
|
||||
#ifdef _WIN32 //half the rest of the code uses windows apis to focus windows. Should be fixed, but it's not too important.
|
||||
HWND mainwindow;
|
||||
|
|
Loading…
Reference in a new issue