X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fcore%2Fprogram.h;h=090d8ed5ebc5c4d191ab24d13f7cef402502cdc3;hp=201d927037c57edf0d1464ca1af4002fb28a6d1a;hb=7f0e08f04536bf42b8f64e7dff5cc3e18b916c7b;hpb=9e9216405fb999a1a6c4f8865264f4e7e335e7aa diff --git a/source/core/program.h b/source/core/program.h index 201d9270..090d8ed5 100644 --- a/source/core/program.h +++ b/source/core/program.h @@ -101,6 +101,14 @@ public: }; private: + enum Stage + { + VERTEX, + GEOMETRY, + FRAGMENT, + MAX_STAGES + }; + struct TransientData { std::map textures; @@ -109,7 +117,7 @@ private: }; unsigned id; - std::vector stage_ids; + unsigned stage_ids[MAX_STAGES]; const Module *module; TransientData *transient; bool linked; @@ -138,7 +146,8 @@ public: void add_stages(const Module &, const std::map & = std::map()); private: - unsigned add_stage(GLenum); + bool has_stages() const; + unsigned add_stage(Stage); void add_glsl_stages(const GlslModule &, const std::map &); void compile_glsl_stage(unsigned); void add_spirv_stages(const SpirVModule &, const std::map &);