Uniform buffer objects (#1127)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
Alex Cristici
2023-05-11 20:33:58 +03:00
committed by Bart Louwers
parent bbb8bf3c1e
commit d8ea91de98
34 changed files with 634 additions and 163 deletions

View File

@@ -148,9 +148,7 @@ gfx::AttributeBindingArray UploadPass::buildAttributeBindings(
// For each attribute in the program, with the corresponding default and optional override...
defaults.resolve(overrides,
[&](const std::string& name,
const gfx::VertexAttribute& defaultAttr,
const gfx::VertexAttribute* overrideAttr) -> void {
[&](const std::string& name, const auto& defaultAttr, const auto& overrideAttr) -> void {
const auto& effectiveAttr = overrideAttr ? *overrideAttr : defaultAttr;
const auto& effectiveGL = static_cast<const gl::VertexAttributeGL&>(effectiveAttr);
const auto& defaultGL = static_cast<const gl::VertexAttributeGL&>(defaultAttr);