#include <vector>
#include <msp/core/refptr.h>
#include "extension.h"
+#include "sourcemap.h"
#include "uniform.h"
#pragma push_macro("interface")
virtual void visit(NodeVisitor &);
};
-enum StageType
-{
- SHARED,
- VERTEX,
- GEOMETRY,
- FRAGMENT
-};
-
struct Stage
{
- StageType type;
+ enum Type
+ {
+ SHARED,
+ VERTEX,
+ GEOMETRY,
+ FRAGMENT
+ };
+
+ Type type;
Stage *previous;
Block content;
std::map<std::string, VariableDeclaration *> in_variables;
Version required_version;
std::vector<const Extension *> required_extensions;
- Stage(StageType);
+ Stage(Type);
+
+ static const char *get_stage_name(Type);
};
struct Module
{
+ SourceMap source_map;
Stage shared;
std::list<Stage> stages;