Drawable Renderer (#1570), Fix color normalization problems, don't produce zero-alpha drawables

This commit is contained in:
Tim Sylvester
2023-05-16 09:59:12 -07:00
committed by Bart Louwers
parent 1fa3502048
commit 76658d8717
5 changed files with 17 additions and 16 deletions

View File

@@ -30,12 +30,12 @@ void DrawableGLBuilder::init() {
}
if (impl->colors.empty()) {
colorAttr->set(0, DrawableGL::colorAttrValue(getColor()));
colorAttr->set(0, gfx::Drawable::colorAttrRGBA(getColor()));
} else {
std::size_t index = 0;
colorAttr->reserve(impl->colors.size());
for (const auto& color : impl->colors) {
colorAttr->set(index++, DrawableGL::colorAttrValue(color));
colorAttr->set(index++, gfx::Drawable::colorAttrRGBA(color));
}
}
}