Shader: Fix function calls with OpenGL

This commit is contained in:
Jérôme Leclercq
2022-03-13 15:07:56 +01:00
parent e40e8eb204
commit e9543b20a2
5 changed files with 104 additions and 1 deletions

View File

@@ -967,7 +967,12 @@ namespace Nz
static_assert(AlwaysFalse<T>::value, "non-exhaustive visitor");
}, node.value);
}
void GlslWriter::Visit(ShaderAst::FunctionExpression& node)
{
const std::string& targetName = Retrieve(m_currentState->previsitor.functions, node.funcId).name;
Append(targetName);
}
void GlslWriter::Visit(ShaderAst::IntrinsicExpression& node)
{

View File

@@ -969,6 +969,11 @@ namespace Nz
AppendIdentifier(m_currentState->constants, node.constantId);
}
void LangWriter::Visit(ShaderAst::FunctionExpression& node)
{
Append(Retrieve(m_currentState->functions, node.funcId).name);
}
void LangWriter::Visit(ShaderAst::IdentifierExpression& node)
{
Append(node.identifier);