]> git.tdb.fi Git - libs/gl.git/commitdiff
Clear all maps before linking the Program
authorMikko Rasa <tdb@tdb.fi>
Fri, 2 Apr 2021 07:31:12 +0000 (10:31 +0300)
committerMikko Rasa <tdb@tdb.fi>
Fri, 2 Apr 2021 08:46:55 +0000 (11:46 +0300)
source/core/program.cpp

index ed4eb6619fa903b4911b955140d90648f6477feb..9c2968497f302ccad397ea311be277da98d683e5 100644 (file)
@@ -277,6 +277,8 @@ void Program::link()
                throw invalid_operation("Program::link");
 
        uniforms.clear();
+       uniform_blocks.clear();
+       attributes.clear();
 
        glLinkProgram(id);
        linked = get_program_i(id, GL_LINK_STATUS);
@@ -358,8 +360,6 @@ void Program::query_uniforms()
 
 void Program::query_uniform_blocks(const vector<UniformInfo *> &uniforms_by_index)
 {
-       uniform_blocks.clear();
-
        std::set<unsigned> used_bind_points;
        unsigned count = get_program_i(id, GL_ACTIVE_UNIFORM_BLOCKS);
        for(unsigned i=0; i<count; ++i)