mirror of
https://github.com/ZDoom/qzdoom-gpl.git
synced 2024-11-29 15:12:11 +00:00
- fixed: FMaterial::ValidateTexture must determine whether to expand sprites before actually constructing the FMaterial object.
This commit is contained in:
parent
df93d1a9f1
commit
d4d041d5fc
1 changed files with 4 additions and 4 deletions
|
@ -413,19 +413,16 @@ FMaterial::FMaterial(FTexture * tx, bool expanded)
|
|||
if (tx->bWarped)
|
||||
{
|
||||
mShaderIndex = tx->bWarped;
|
||||
expanded = false;
|
||||
tx->gl_info.shaderspeed = static_cast<FWarpTexture*>(tx)->GetSpeed();
|
||||
}
|
||||
else if (tx->bHasCanvas)
|
||||
{
|
||||
expanded = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (tx->gl_info.shaderindex >= FIRST_USER_SHADER)
|
||||
{
|
||||
mShaderIndex = tx->gl_info.shaderindex;
|
||||
expanded = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -439,7 +436,6 @@ FMaterial::FMaterial(FTexture * tx, bool expanded)
|
|||
}
|
||||
}
|
||||
}
|
||||
assert(tx->gl_info.Material[expanded] == NULL);
|
||||
mBaseLayer = ValidateSysTexture(tx, true);
|
||||
|
||||
|
||||
|
@ -765,6 +761,10 @@ FMaterial * FMaterial::ValidateTexture(FTexture * tex, bool expand)
|
|||
FMaterial *gltex = tex->gl_info.Material[expand];
|
||||
if (gltex == NULL)
|
||||
{
|
||||
if (tex->bWarped || tex->bHasCanvas || tex->gl_info.shaderindex >= FIRST_USER_SHADER)
|
||||
{
|
||||
expand = false;
|
||||
}
|
||||
gltex = new FMaterial(tex, expand);
|
||||
}
|
||||
return gltex;
|
||||
|
|
Loading…
Reference in a new issue