Drawable Renderer (#1570), Setting up for fill patterns.

Handle color and cull modes better.
Rename `DrawableBuilder::ColorMode` to `ColorAttrMode` to avoid confusion with `gfx::ColorMode`.
This commit is contained in:
Tim Sylvester
2023-05-23 12:59:36 -07:00
committed by Bart Louwers
parent ec45ef654e
commit b8bdf0643c
21 changed files with 721 additions and 158 deletions

View File

@@ -21,7 +21,7 @@ void DrawableGLBuilder::init() {
posAttr->set(index++, gfx::VertexAttribute::int2{vert.a1[0], vert.a1[1]});
}
}
if (colorMode != ColorMode::None && !colorAttrName.empty()) {
if (colorAttrMode != ColorAttrMode::None && !colorAttrName.empty()) {
if (const auto& colorAttr = attrs.getOrAdd(colorAttrName)) {
// We should have either a single color or one per vertex. Otherwise,
// the color mode was probably changed after vertexes were added.