Renderer/ShaderAst: Add Cast node

This commit is contained in:
Lynix
2017-01-06 00:49:24 +01:00
parent a84391cf08
commit 2a57af9896
8 changed files with 124 additions and 0 deletions

View File

@@ -139,5 +139,29 @@ namespace Nz { namespace ShaderAst
{
visitor.Write(*this);
}
ExpressionType Cast::GetExpressionType() const
{
return exprType;
}
void Cast::Register(ShaderWriter& visitor)
{
auto it = expressions.begin();
(*it)->Register(visitor);
for (; it != expressions.end(); ++it)
{
if (!*it)
break;
(*it)->Register(visitor);
}
}
void Cast::Visit(ShaderWriter& visitor)
{
visitor.Write(*this);
}
}
}