- removed all code that mixes together the different lighting methods. Now everything goes through the 3 different light parameters in the render state.
- removed cm parameter from many functions.
This commit is contained in:
parent
887d35d559
commit
978ace241c
31 changed files with 154 additions and 507 deletions
|
|
@ -835,14 +835,14 @@ outl:
|
|||
//
|
||||
//===========================================================================
|
||||
|
||||
void FMaterial::Bind(int cm, int clampmode, int translation, int overrideshader)
|
||||
void FMaterial::Bind(int clampmode, int translation, int overrideshader)
|
||||
{
|
||||
int usebright = false;
|
||||
int shaderindex = overrideshader > 0? overrideshader : mShaderIndex;
|
||||
int maxbound = 0;
|
||||
bool allowhires = tex->xScale == FRACUNIT && tex->yScale == FRACUNIT;
|
||||
|
||||
int softwarewarp = gl_RenderState.SetupShader(tex->bHasCanvas, shaderindex, cm, tex->gl_info.shaderspeed);
|
||||
int softwarewarp = gl_RenderState.SetupShader(tex->bHasCanvas, shaderindex, tex->gl_info.shaderspeed);
|
||||
|
||||
if (tex->bHasCanvas || tex->bWarped) clampmode = 0;
|
||||
else if (clampmode != -1) clampmode &= 3;
|
||||
|
|
@ -883,13 +883,13 @@ void FMaterial::Bind(int cm, int clampmode, int translation, int overrideshader)
|
|||
//
|
||||
//===========================================================================
|
||||
|
||||
void FMaterial::BindPatch(int cm, int translation, int overrideshader)
|
||||
void FMaterial::BindPatch(int translation, int overrideshader)
|
||||
{
|
||||
int usebright = false;
|
||||
int shaderindex = overrideshader > 0? overrideshader : mShaderIndex;
|
||||
int maxbound = 0;
|
||||
|
||||
int softwarewarp = gl_RenderState.SetupShader(tex->bHasCanvas, shaderindex, cm, tex->gl_info.shaderspeed);
|
||||
int softwarewarp = gl_RenderState.SetupShader(tex->bHasCanvas, shaderindex, tex->gl_info.shaderspeed);
|
||||
|
||||
const FHardwareTexture *glpatch = mBaseLayer->BindPatch(0, translation, softwarewarp, gl.needAlphaTexture);
|
||||
// The only multitexture effect usable on sprites is the brightmap.
|
||||
|
|
@ -916,7 +916,7 @@ void FMaterial::Precache()
|
|||
{
|
||||
if (tex->UseType==FTexture::TEX_Sprite)
|
||||
{
|
||||
BindPatch(CM_DEFAULT, 0);
|
||||
BindPatch(0);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -925,10 +925,10 @@ void FMaterial::Precache()
|
|||
{
|
||||
if (mBaseLayer->gltexture[i] != 0)
|
||||
{
|
||||
Bind (CM_DEFAULT, i, 0);
|
||||
Bind (i, 0);
|
||||
cached++;
|
||||
}
|
||||
if (cached == 0) Bind(CM_DEFAULT, -1, 0);
|
||||
if (cached == 0) Bind(-1, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue