From 171d9bbde3416bcb73339fc4175035817cdf963d Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Fri, 2 Apr 2021 10:31:12 +0300 Subject: [PATCH] Clear all maps before linking the Program --- source/core/program.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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