virtual void visit(Return &);
};
-enum ContextType
+enum StageType
{
- GLOBAL,
+ SHARED,
VERTEX,
GEOMETRY,
FRAGMENT
};
-struct Context
+struct Stage
{
- ContextType type;
+ StageType type;
bool present;
- Context *previous;
+ Stage *previous;
ProgramSyntax::Block content;
std::map<std::string, VariableDeclaration *> in_variables;
std::map<std::string, VariableDeclaration *> out_variables;
- Context(ContextType);
+ Stage(StageType);
};
struct Module
{
- Context global_context;
- Context vertex_context;
- Context geometry_context;
- Context fragment_context;
+ Stage shared;
+ Stage vertex_stage;
+ Stage geometry_stage;
+ Stage fragment_stage;
Module();
};