finalize_uniforms();
- for(const ReflectData::UniformInfo &u: reflect_data.uniforms)
- if(u.binding>=0)
- reflect_data.used_bindings.push_back(u.binding);
- for(const ReflectData::UniformBlockInfo &b: reflect_data.uniform_blocks)
- reflect_data.used_bindings.push_back(b.bind_point);
- sort(reflect_data.used_bindings);
+ reflect_data.update_used_bindings();
for(const ReflectData::UniformInfo &u: reflect_data.uniforms)
require_type(u.type);
}
}
+void ReflectData::update_used_bindings()
+{
+ for(const UniformInfo &u: uniforms)
+ if(u.binding>=0)
+ used_bindings.push_back(u.binding);
+ for(const UniformBlockInfo &b: uniform_blocks)
+ used_bindings.push_back(b.bind_point);
+ sort(used_bindings);
+}
+
void ReflectData::UniformBlockInfo::sort_uniforms()
{
std::vector<int> used_bindings;
void update_layout_hash();
+ void update_used_bindings();
};
} // namespace GL