X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fglsl%2Fgenerate.h;h=bcb70c04c6da49c0df7dc294d37d38139bbd8fda;hb=8173340a7737e32cb25b21b67049102bd1526beb;hp=977ed156f4490ab9e282b328d59c6c88074db3f2;hpb=9ec831710f64a62ad5f2e896a55ae82a3519f29e;p=libs%2Fgl.git diff --git a/source/glsl/generate.h b/source/glsl/generate.h index 977ed156..bcb70c04 100644 --- a/source/glsl/generate.h +++ b/source/glsl/generate.h @@ -61,12 +61,12 @@ class VariableResolver: private TraversingVisitor { private: Stage *stage; - std::map *members; - RefPtr iface_ref; + std::map *r_members; + RefPtr r_iface_ref; std::string block_interface; bool record_target; - VariableDeclaration *assignment_target; - bool self_referencing; + VariableDeclaration *r_assignment_target; + bool r_self_referencing; public: VariableResolver(); @@ -141,39 +141,6 @@ private: virtual void visit(Passthrough &); }; -/** Reorders declarations to ensure that declarations always appear before -references. */ -class DeclarationReorderer: private TraversingVisitor -{ -private: - enum DeclarationKind - { - NO_DECLARATION, - LAYOUT, - STRUCT, - VARIABLE, - FUNCTION - }; - - DeclarationKind kind; - std::set ordered_funcs; - std::set needed_funcs; - -public: - DeclarationReorderer(); - - void apply(Stage &s) { s.content.visit(*this); } - -private: - virtual void visit(Block &); - virtual void visit(FunctionCall &); - virtual void visit(InterfaceLayout &) { kind = LAYOUT; } - virtual void visit(StructDeclaration &) { kind = STRUCT; } - virtual void visit(VariableDeclaration &); - virtual void visit(InterfaceBlock &) { kind = VARIABLE; } - virtual void visit(FunctionDeclaration &); -}; - } // namespace SL } // namespace GL } // namespace Msp