]> git.tdb.fi Git - libs/gl.git/blobdiff - source/programsyntax.cpp
Automatically backport shaders to earlier GLSL versions if necessary
[libs/gl.git] / source / programsyntax.cpp
index 83cfbb089b4d5d3278722b384c82a91a382aa4d1..098130f87c2e4920597eadb2838295b782dbf740 100644 (file)
@@ -72,6 +72,7 @@ void Assignment::visit(NodeVisitor &visitor)
 
 
 FunctionCall::FunctionCall():
+       declaration(0),
        constructor(false)
 { }
 
@@ -87,6 +88,12 @@ void ExpressionStatement::visit(NodeVisitor &visitor)
 }
 
 
+void Import::visit(NodeVisitor &visitor)
+{
+       visitor.visit(*this);
+}
+
+
 void Layout::visit(NodeVisitor &visitor)
 {
        visitor.visit(*this);
@@ -130,7 +137,15 @@ void InterfaceBlock::visit(NodeVisitor &visitor)
 
 
 FunctionDeclaration::FunctionDeclaration():
-       definition(false)
+       definition(0)
+{ }
+
+FunctionDeclaration::FunctionDeclaration(const FunctionDeclaration &other):
+       return_type(other.return_type),
+       name(other.name),
+       parameters(other.parameters),
+       definition(other.definition==&other ? this : other.definition),
+       body(other.body)
 { }
 
 void FunctionDeclaration::visit(NodeVisitor &visitor)