mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-23 20:43:15 +00:00
Added ability to set defines in custom HW shaders
This commit is contained in:
parent
e306d4ee04
commit
7de9e1f097
1 changed files with 12 additions and 0 deletions
|
@ -1442,6 +1442,18 @@ class GLDefsParser
|
|||
sc.ScriptError("Error: out of texture units in texture '%s'", tex? tex->Name.GetChars() : "(null)");
|
||||
}
|
||||
}
|
||||
else if(sc.Compare("define"))
|
||||
{
|
||||
sc.MustGetString();
|
||||
FString defineName = sc.String;
|
||||
FString defineValue = "";
|
||||
if(sc.CheckToken('='))
|
||||
{
|
||||
sc.MustGetString();
|
||||
defineValue = sc.String;
|
||||
}
|
||||
texnameDefs.AppendFormat("#define %s %s\n", defineName.GetChars(), defineValue.GetChars());
|
||||
}
|
||||
}
|
||||
if (!tex)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue