From: Mikko Rasa Date: Fri, 2 Apr 2021 07:31:12 +0000 (+0300) Subject: Clear all maps before linking the Program X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=171d9bbde3416bcb73339fc4175035817cdf963d;p=libs%2Fgl.git Clear all maps before linking the Program --- diff --git a/source/core/program.cpp b/source/core/program.cpp index ed4eb661..9c296849 100644 --- a/source/core/program.cpp +++ b/source/core/program.cpp @@ -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 &uniforms_by_index) { - uniform_blocks.clear(); - std::set used_bind_points; unsigned count = get_program_i(id, GL_ACTIVE_UNIFORM_BLOCKS); for(unsigned i=0; i