Added ability to set defines in custom HW shaders

This commit is contained in:
usernameak 2018-07-05 17:25:55 +03:00 committed by Christoph Oelckers
parent e306d4ee04
commit 7de9e1f097

View file

@ -1442,6 +1442,18 @@ class GLDefsParser
sc.ScriptError("Error: out of texture units in texture '%s'", tex? tex->Name.GetChars() : "(null)"); 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) if (!tex)
{ {