X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fglsl%2Fgenerate.h;h=fc58b2db16134108cf4e7fa653d6c1a6258b9ce3;hp=b2cfadc428f6184e7e44b74c310e300e7cc122c4;hb=38712d8ecc57d043a2419ffbaeeb57f7a6586f14;hpb=d9d7ab44d5f88c4537906e77c49db06d6bdc099c diff --git a/source/glsl/generate.h b/source/glsl/generate.h index b2cfadc4..fc58b2db 100644 --- a/source/glsl/generate.h +++ b/source/glsl/generate.h @@ -14,8 +14,12 @@ namespace SL { /** Assigns IDs to specialization constants with an automatic ID. */ class ConstantIdAssigner: private TraversingVisitor { +private: + std::set used_ids; + std::vector auto_constants; + public: - void apply(Stage &); + void apply(Module &, const Features &); private: virtual void visit(VariableDeclaration &); @@ -32,20 +36,18 @@ Unresolved variables are looked up in the previous stage's out variables. */ class InterfaceGenerator: private TraversingVisitor { private: - Stage *stage; + Stage *stage = 0; std::string in_prefix; std::string out_prefix; - bool function_scope; - bool copy_block; + bool function_scope = false; + bool copy_block = false; std::vector declared_inputs; - Block *iface_target_block; + Block *iface_target_block = 0; NodeList::iterator iface_insert_point; NodeList::iterator assignment_insert_point; std::set nodes_to_remove; public: - InterfaceGenerator(); - void apply(Stage &); private: