Merge remote-tracking branch 'gzdoom/master'

This commit is contained in:
Rachael Alexanderson 2017-11-19 04:41:48 -05:00
commit 5c6e62cf6b
4 changed files with 11 additions and 3 deletions

View file

@ -583,7 +583,7 @@ int FIWadManager::IdentifyVersion (TArray<FString> &wadfiles, const char *iwad,
// We have a -iwad parameter. Pick the first usable IWAD we found through that.
for (unsigned i = numFoundWads; i < mFoundWads.Size(); i++)
{
if (mFoundWads[i].mInfoIndex > 0)
if (mFoundWads[i].mInfoIndex >= 0)
{
picks.Push(mFoundWads[i]);
break;

View file

@ -150,6 +150,12 @@ bool FRenderState::ApplyShader()
}
}
if (!activeShader)
{
assert(0); // We should not be getting to this point!
return false;
}
glVertexAttrib4fv(VATTR_COLOR, mColor.vec);
glVertexAttrib4fv(VATTR_NORMAL, mNormal.vec);
//activeShader->muObjectColor2.Set(mObjectColor2);
@ -374,7 +380,8 @@ void FRenderState::ApplyLightIndex(int index)
{
index = GLRenderer->mLights->BindUBO(index);
}
activeShader->muLightIndex.Set(index);
if (activeShader)
activeShader->muLightIndex.Set(index);
}
}

View file

@ -682,6 +682,7 @@ void gl_ParseHardwareShader(FScanner &sc, int deflump)
PostProcessShader shaderdesc;
shaderdesc.Target = sc.String;
shaderdesc.Target.ToLower();
bool validTarget = false;
if (sc.Compare("beforebloom")) validTarget = true;

View file

@ -564,7 +564,7 @@ void gl_ParseBrightmap(FScanner &sc, int deflump)
else sc.UnGet();
sc.MustGetString();
FTextureID no = TexMan.CheckForTexture(sc.String, type);
FTextureID no = TexMan.CheckForTexture(sc.String, type, FTextureManager::TEXMAN_TryAny | FTextureManager::TEXMAN_Overridable);
FTexture *tex = TexMan[no];
sc.MustGetToken('{');