X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcore%2Fprogram.h;h=dab249f47684546f42cc64b2c0436f538c434126;hb=df9119a9bf2d348a513c515ed92953353da97b54;hp=f41a7d6ddf99d56218d8b53b6578853c2dca8e71;hpb=160e9eea29bd10034733d59507fa1bcca36be401;p=libs%2Fgl.git diff --git a/source/core/program.h b/source/core/program.h index f41a7d6d..dab249f4 100644 --- a/source/core/program.h +++ b/source/core/program.h @@ -13,8 +13,10 @@ namespace Msp { namespace GL { /** -A complete shader program. Programs can be assembled of individual Shaders or -generated with a set of standard features. +A shader program consisting of one or more stages. + +Programs are created from Modules. Specialization values can be applied to +customize behaviour of the module. */ class Program: public ProgramBackend { @@ -52,7 +54,7 @@ private: public: /// Constructs an empty Program with no shader stages attached. - Program() { } + Program() = default; /// Constructs a Program from a Module, with specialization constants. Program(const Module &, const std::map & = std::map()); @@ -62,6 +64,8 @@ private: void collect_uniforms(const SpirVModule &, const std::map &); void collect_block_uniforms(const SpirVModule::Structure &, const std::string &, unsigned, const std::map &, std::vector &); void collect_attributes(const SpirVModule &); + void collect_builtins(const SpirVModule &); + void collect_builtins(const SpirVModule::Structure &); public: ReflectData::LayoutHash get_uniform_layout_hash() const { return reflect_data.layout_hash; } @@ -76,6 +80,7 @@ public: const std::vector &get_attributes() const { return reflect_data.attributes; } const ReflectData::AttributeInfo &get_attribute_info(const std::string &) const; int get_attribute_location(const std::string &) const; + unsigned get_n_clip_distances() const { return reflect_data.n_clip_distances; } using ProgramBackend::set_debug_name; };