Shader: Add support for while loops
This commit is contained in:
@@ -930,6 +930,17 @@ namespace Nz
|
||||
node.expression->Visit(*this);
|
||||
}
|
||||
|
||||
void LangWriter::Visit(ShaderAst::WhileStatement& node)
|
||||
{
|
||||
Append("while (");
|
||||
node.condition->Visit(*this);
|
||||
AppendLine(")");
|
||||
|
||||
EnterScope();
|
||||
node.body->Visit(*this);
|
||||
LeaveScope();
|
||||
}
|
||||
|
||||
void LangWriter::AppendHeader()
|
||||
{
|
||||
// Nothing yet
|
||||
|
||||
Reference in New Issue
Block a user