From: Mikko Rasa Date: Mon, 11 Oct 2021 13:17:27 +0000 (+0300) Subject: Clear reflect data before adding shader stages X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=afb4e0ab972776eb17e97ca8f3be02c64e77cf46;p=libs%2Fgl.git Clear reflect data before adding shader stages Otherwise it prevents the number of clip distances from being recorded. --- diff --git a/source/core/program.cpp b/source/core/program.cpp index 4707f4c0..1a7ac17b 100644 --- a/source/core/program.cpp +++ b/source/core/program.cpp @@ -17,6 +17,8 @@ void Program::add_stages(const Module &mod, const map &spec_values) if(has_stages()) throw invalid_operation("Program::add_stages"); + reflect_data = ReflectData(); + TransientData transient; switch(mod.get_format()) { @@ -30,8 +32,6 @@ void Program::add_stages(const Module &mod, const map &spec_values) throw invalid_argument("Program::add_stages"); } - reflect_data = ReflectData(); - finalize(mod); if(mod.get_format()==Module::GLSL)