Custom hardware shaders now can use custom texture units
This commit is contained in:
parent
2d0fb4ed2e
commit
292458ee2d
3 changed files with 29 additions and 0 deletions
|
|
@ -1398,6 +1398,24 @@ class GLDefsParser
|
|||
sc.MustGetFloat();
|
||||
speed = float(sc.Float);
|
||||
}
|
||||
else if (sc.Compare("texture"))
|
||||
{
|
||||
sc.MustGetString();
|
||||
bool okay = false;
|
||||
for(int i = 0; i < MAX_CUSTOM_HW_SHADER_TEXTURES; i++) {
|
||||
if(!tex->CustomShaderTextures[i]) {
|
||||
tex->CustomShaderTextures[i] = TexMan.FindTexture(sc.String, ETextureType::Any, FTextureManager::TEXMAN_TryAny);
|
||||
if (!tex->CustomShaderTextures[i]) {
|
||||
sc.ScriptError("Custom hardware shader texture '%s' not found in texture '%s'\n", sc.String, tex? tex->Name.GetChars() : "(null)");
|
||||
}
|
||||
okay = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(!okay) {
|
||||
sc.ScriptError("Error: out of texture units in texture '%s'", tex? tex->Name.GetChars() : "(null)");
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!tex)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue