X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fglsl%2Fgenerate.h;h=48fc742342bdf042aa32bdbd5686e61e1e43bbe0;hp=977ed156f4490ab9e282b328d59c6c88074db3f2;hb=518f751d385b733adbf43fe4056403740709edec;hpb=f7b29fcfe408965c9cba79095eb05c49eca4a98e diff --git a/source/glsl/generate.h b/source/glsl/generate.h index 977ed156..48fc7423 100644 --- a/source/glsl/generate.h +++ b/source/glsl/generate.h @@ -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