]> git.tdb.fi Git - libs/gl.git/blobdiff - source/glsl/compatibility.h
Rename members of visitors to indicate which are "return values"
[libs/gl.git] / source / glsl / compatibility.h
index 852a6590bd67c287cf272d1a85bc9cfdb746a5c3..c30dce8c2f3c7728188a6dcc1e7c671c08a405d5 100644 (file)
@@ -8,6 +8,8 @@ namespace Msp {
 namespace GL {
 namespace SL {
 
+/** Generates default precision declarations if they are missing, to satisfy
+GLSL ES requirements. */
 class DefaultPrecisionGenerator: private TraversingVisitor
 {
 private:
@@ -26,6 +28,8 @@ private:
        virtual void visit(VariableDeclaration &);
 };
 
+/** Removes precision qualifiers from variable declarations, as well as
+default precision declarations. */
 class PrecisionRemover: private TraversingVisitor
 {
 private:
@@ -39,12 +43,14 @@ private:
        virtual void visit(VariableDeclaration &);
 };
 
+/** Converts structures of the syntax tree to match a particular set of
+features. */
 class LegacyConverter: private TraversingVisitor
 {
 private:
        Stage *stage;
        Features features;
-       std::string type;
+       std::string r_type;
        VariableDeclaration *frag_out;
        NodeList<Statement>::iterator uniform_insert_point;
        std::set<Node *> nodes_to_remove;