X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcore%2Fprogram.h;h=dd7d4b5f029789a074815ff94d9112e27c6818a6;hb=e70662d7812464159f2e47f4bebb69d88f89ae93;hp=fd1c1ae09d10e12943ca13140339b96d59cd5ecf;hpb=38712d8ecc57d043a2419ffbaeeb57f7a6586f14;p=libs%2Fgl.git diff --git a/source/core/program.h b/source/core/program.h index fd1c1ae0..dd7d4b5f 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 { @@ -59,9 +61,11 @@ public: void add_stages(const Module &, const std::map & = std::map()); 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_uniforms(const SpirVModule &); + void collect_block_uniforms(const SpirVModule::Structure &, const std::string &, unsigned, 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; };