mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 08:52:00 +00:00
- use glVertexAttrib consistently for the presentation drawcall.
- fixed vid_saturation default and adjusted ranges for gamma correction CVARs.
This commit is contained in:
parent
26dbf5fe10
commit
d80159b76a
2 changed files with 8 additions and 13 deletions
|
@ -476,30 +476,25 @@ CUSTOM_CVAR(String, playername, "Player", CVAR_ARCHIVE | CVAR_USERINFO)
|
|||
CUSTOM_CVARD(Float, vid_gamma, 1.f, CVAR_ARCHIVE | CVAR_GLOBALCONFIG, "adjusts gamma component of gamma ramp")
|
||||
{
|
||||
if (self < 0) self = 0;
|
||||
else if (self > 5) self = 5;
|
||||
// todo: tell the system to update
|
||||
else if (self > 4) self = 4;
|
||||
}
|
||||
|
||||
CUSTOM_CVARD(Float, vid_contrast, 1.f, CVAR_ARCHIVE | CVAR_GLOBALCONFIG, "adjusts contrast component of gamma ramp")
|
||||
{
|
||||
if (self < 0) self = 0;
|
||||
else if (self > 5) self = 5;
|
||||
// todo: tell the system to update
|
||||
}
|
||||
|
||||
CUSTOM_CVARD(Float, vid_brightness, 0.f, CVAR_ARCHIVE | CVAR_GLOBALCONFIG, "adjusts brightness component of gamma ramp")
|
||||
{
|
||||
if (self < 0) self = 0;
|
||||
else if (self > 5) self = 5;
|
||||
// todo: tell the system to update
|
||||
if (self < -2) self = -2;
|
||||
else if (self > 2) self = 2;
|
||||
}
|
||||
|
||||
|
||||
CUSTOM_CVARD(Float, vid_saturation, 0.f, CVAR_ARCHIVE | CVAR_GLOBALCONFIG, "adjusts saturation component of gamma ramp")
|
||||
CUSTOM_CVARD(Float, vid_saturation, 1.f, CVAR_ARCHIVE | CVAR_GLOBALCONFIG, "adjusts saturation component of gamma ramp")
|
||||
{
|
||||
if (self < -3) self = -3;
|
||||
else if (self > 3) self = 3;
|
||||
// todo: tell the system to update
|
||||
}
|
||||
|
||||
CVAR(Int, gl_satformula, 1, CVAR_ARCHIVE|CVAR_GLOBALCONFIG);
|
||||
|
|
|
@ -59,13 +59,13 @@ void FGLRenderer::RenderScreenQuad()
|
|||
#else
|
||||
glBegin(GL_TRIANGLE_STRIP);
|
||||
glVertexAttrib2f(1, 0, 0);
|
||||
glVertex2f(-1, -1);
|
||||
glVertexAttrib2f(0, -1, -1);
|
||||
glVertexAttrib2f(1, 0, 1);
|
||||
glVertex2f(-1, 1);
|
||||
glVertexAttrib2f(0, -1, 1);
|
||||
glVertexAttrib2f(1, 1, 0);
|
||||
glVertex2f(1, -1);
|
||||
glVertexAttrib2f(0, 1, -1);
|
||||
glVertexAttrib2f(1, 1, 1);
|
||||
glVertex2f(1,1);
|
||||
glVertexAttrib2f(0, 1,1);
|
||||
glEnd();
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue