]> git.tdb.fi Git - libs/gl.git/blobdiff - source/glsl/validate.h
Check that variable references refer do declared variables
[libs/gl.git] / source / glsl / validate.h
index c723b995567f869330d0c4f393278c824c33cab8..bf2677e8d1cd993f67a5fa1936c4aeb37c0f32f1 100644 (file)
@@ -50,6 +50,17 @@ private:
        virtual void visit(FunctionDeclaration &);
 };
 
+class ReferenceValidator: private Validator
+{
+public:
+       void apply(Stage &s) { stage = &s; s.content.visit(*this); }
+
+private:
+       virtual void visit(VariableReference &);
+       virtual void visit(InterfaceBlockReference &);
+       virtual void visit(VariableDeclaration &);
+};
+
 } // namespace SL
 } // namespace GL
 } // namespace Msp