X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fprogramsyntax.h;h=c645a60a442ec91a616060f11c55327e9a34d4f6;hb=a29cc14162e911b36d18d1d1896216697c7dc0c1;hp=c8b0e1f74ed9d1679e8c652ddb1f52f896872df5;hpb=961715848c111907b5f443c5b545a429b40583e6;p=libs%2Fgl.git diff --git a/source/programsyntax.h b/source/programsyntax.h index c8b0e1f7..c645a60a 100644 --- a/source/programsyntax.h +++ b/source/programsyntax.h @@ -301,32 +301,29 @@ struct TraversingVisitor: NodeVisitor virtual void visit(Return &); }; -enum ContextType +enum StageType { - GLOBAL, + SHARED, VERTEX, GEOMETRY, FRAGMENT }; -struct Context +struct Stage { - ContextType type; - bool present; - Context *previous; + StageType type; + Stage *previous; ProgramSyntax::Block content; std::map in_variables; std::map out_variables; - Context(ContextType); + Stage(StageType); }; struct Module { - Context global_context; - Context vertex_context; - Context geometry_context; - Context fragment_context; + Stage shared; + std::list stages; Module(); };