Ok, it had to be done: Removed shader support for pre GLSL 1.3/GL 3.0 hardware. The compromises needed to accomodate these are just too bad and would block any attempt at streamlining the code.
This commit is contained in:
parent
92b9814460
commit
09f4071436
23 changed files with 130 additions and 259 deletions
|
|
@ -80,12 +80,12 @@ CVAR(Bool, gl_brightfog, false, CVAR_ARCHIVE);
|
|||
|
||||
bool gl_BrightmapsActive()
|
||||
{
|
||||
return gl.shadermodel == 4 || (gl.shadermodel == 3 && gl_brightmap_shader);
|
||||
return gl.hasGLSL();
|
||||
}
|
||||
|
||||
bool gl_GlowActive()
|
||||
{
|
||||
return gl.shadermodel == 4 || (gl.shadermodel == 3 && gl_glow_shader);
|
||||
return gl.hasGLSL();
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
|
|
@ -125,7 +125,7 @@ CUSTOM_CVAR(Int,gl_fogmode,1,CVAR_ARCHIVE|CVAR_NOINITCALL)
|
|||
{
|
||||
if (self>2) self=2;
|
||||
if (self<0) self=0;
|
||||
if (self == 2 && gl.shadermodel < 4) self = 1;
|
||||
if (self == 2 && !gl.hasGLSL()) self = 1;
|
||||
}
|
||||
|
||||
CUSTOM_CVAR(Int, gl_lightmode, 3 ,CVAR_ARCHIVE|CVAR_NOINITCALL)
|
||||
|
|
@ -133,7 +133,7 @@ CUSTOM_CVAR(Int, gl_lightmode, 3 ,CVAR_ARCHIVE|CVAR_NOINITCALL)
|
|||
int newself = self;
|
||||
if (newself > 4) newself=8; // use 8 for software lighting to avoid conflicts with the bit mask
|
||||
if (newself < 0) newself=0;
|
||||
if ((newself == 2 || newself == 8) && gl.shadermodel < 4) newself = 3;
|
||||
if ((newself == 2 || newself == 8) && !gl.hasGLSL()) newself = 3;
|
||||
if (self != newself) self = newself;
|
||||
glset.lightmode = newself;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue