Move no-mipmapping from actor renderflag/particle flag, to a material property in GLDEFS, where it makes more sense. The feature was introduced in the short-lived engine version of 4.13 which was deemed too broken and needed to be replaced with a newer version anyway, so might as well perform an API-breaking change at this point in time. Note that this currently only works for sprites (its primary targeted use case) -- walls, flats and models can be patched in later.
This commit is contained in:
parent
5fb83d4762
commit
a45bf49616
8 changed files with 29 additions and 15 deletions
|
|
@ -1270,6 +1270,7 @@ class GLDefsParser
|
|||
bool disable_fullbright_specified = false;
|
||||
bool thiswad = false;
|
||||
bool iwad = false;
|
||||
bool no_mipmap = false;
|
||||
|
||||
UserShaderDesc usershader;
|
||||
TArray<FString> texNameList;
|
||||
|
|
@ -1319,6 +1320,10 @@ class GLDefsParser
|
|||
// only affects textures defined in the IWAD.
|
||||
iwad = true;
|
||||
}
|
||||
else if (sc.Compare("nomipmap"))
|
||||
{
|
||||
no_mipmap = true;
|
||||
}
|
||||
else if (sc.Compare("glossiness"))
|
||||
{
|
||||
sc.MustGetFloat();
|
||||
|
|
@ -1422,6 +1427,8 @@ class GLDefsParser
|
|||
if (!useme) return;
|
||||
}
|
||||
|
||||
tex->SetNoMipmap(no_mipmap);
|
||||
|
||||
FGameTexture **bindings[6] =
|
||||
{
|
||||
&mlay.Brightmap,
|
||||
|
|
@ -1681,6 +1688,7 @@ class GLDefsParser
|
|||
bool disable_fullbright = false;
|
||||
bool thiswad = false;
|
||||
bool iwad = false;
|
||||
bool no_mipmap = false;
|
||||
int maplump = -1;
|
||||
UserShaderDesc desc;
|
||||
desc.shaderType = SHADER_Default;
|
||||
|
|
@ -1723,6 +1731,10 @@ class GLDefsParser
|
|||
if (!found)
|
||||
sc.ScriptError("Unknown material type '%s' specified\n", sc.String);
|
||||
}
|
||||
else if (sc.Compare("nomipmap"))
|
||||
{
|
||||
no_mipmap = true;
|
||||
}
|
||||
else if (sc.Compare("speed"))
|
||||
{
|
||||
sc.MustGetFloat();
|
||||
|
|
@ -1784,6 +1796,8 @@ class GLDefsParser
|
|||
return;
|
||||
}
|
||||
|
||||
tex->SetNoMipmap(no_mipmap);
|
||||
|
||||
int firstUserTexture;
|
||||
switch (desc.shaderType)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue