]> git.tdb.fi Git - libs/gl.git/blobdiff - source/programsyntax.h
Disable mipmaps from various render target textures
[libs/gl.git] / source / programsyntax.h
index d681c50b924065f69a1ae990381af884d00bef0e..b0ad02b394c480708d1b871173b37cff3c3df6fd 100644 (file)
@@ -178,10 +178,20 @@ struct Import: Node
        virtual void visit(NodeVisitor &);
 };
 
+struct Precision: Node
+{
+       std::string precision;
+       std::string type;
+
+       virtual Precision *clone() const { return new Precision(*this); }
+       virtual void visit(NodeVisitor &);
+};
+
 struct Layout: Node
 {
        struct Qualifier
        {
+               // TODO the standard calls this name, not identifier
                std::string identifier;
                std::string value;
        };
@@ -217,6 +227,7 @@ struct VariableDeclaration: Node
        bool constant;
        std::string sampling;
        std::string interface;
+       std::string precision;
        std::string type;
        StructDeclaration *type_declaration;
        std::string name;
@@ -321,6 +332,7 @@ struct NodeVisitor
        virtual void visit(FunctionCall &) { }
        virtual void visit(ExpressionStatement &) { }
        virtual void visit(Import &) { }
+       virtual void visit(Precision &) { }
        virtual void visit(Layout &) { }
        virtual void visit(InterfaceLayout &) { }
        virtual void visit(StructDeclaration &) { }
@@ -336,6 +348,7 @@ struct NodeVisitor
 
 struct TraversingVisitor: NodeVisitor
 {
+       using NodeVisitor::visit;
        virtual void visit(Block &);
        virtual void visit(ParenthesizedExpression &);
        virtual void visit(MemberAccess &);