mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-12 07:34:50 +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)
|
if (tx->bWarped)
|
||||||
{
|
{
|
||||||
mShaderIndex = tx->bWarped;
|
mShaderIndex = tx->bWarped;
|
||||||
expanded = false;
|
|
||||||
tx->gl_info.shaderspeed = static_cast<FWarpTexture*>(tx)->GetSpeed();
|
tx->gl_info.shaderspeed = static_cast<FWarpTexture*>(tx)->GetSpeed();
|
||||||
}
|
}
|
||||||
else if (tx->bHasCanvas)
|
else if (tx->bHasCanvas)
|
||||||
{
|
{
|
||||||
expanded = false;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (tx->gl_info.shaderindex >= FIRST_USER_SHADER)
|
if (tx->gl_info.shaderindex >= FIRST_USER_SHADER)
|
||||||
{
|
{
|
||||||
mShaderIndex = tx->gl_info.shaderindex;
|
mShaderIndex = tx->gl_info.shaderindex;
|
||||||
expanded = false;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -439,7 +436,6 @@ FMaterial::FMaterial(FTexture * tx, bool expanded)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
assert(tx->gl_info.Material[expanded] == NULL);
|
|
||||||
mBaseLayer = ValidateSysTexture(tx, true);
|
mBaseLayer = ValidateSysTexture(tx, true);
|
||||||
|
|
||||||
|
|
||||||
|
@ -765,6 +761,10 @@ FMaterial * FMaterial::ValidateTexture(FTexture * tex, bool expand)
|
||||||
FMaterial *gltex = tex->gl_info.Material[expand];
|
FMaterial *gltex = tex->gl_info.Material[expand];
|
||||||
if (gltex == NULL)
|
if (gltex == NULL)
|
||||||
{
|
{
|
||||||
|
if (tex->bWarped || tex->bHasCanvas || tex->gl_info.shaderindex >= FIRST_USER_SHADER)
|
||||||
|
{
|
||||||
|
expand = false;
|
||||||
|
}
|
||||||
gltex = new FMaterial(tex, expand);
|
gltex = new FMaterial(tex, expand);
|
||||||
}
|
}
|
||||||
return gltex;
|
return gltex;
|
||||||
|
|
Loading…
Reference in a new issue