Topic/fill pass (#1225)

This commit is contained in:
Tim Sylvester
2023-06-09 07:23:17 -07:00
committed by Bart Louwers
parent bffa77f98c
commit b060abeb92
15 changed files with 344 additions and 259 deletions

View File

@@ -39,7 +39,7 @@ void DrawableGL::draw(const PaintParameters& parameters) const {
context.setDepthMode(parameters.depthModeForSublayer(getSubLayerIndex(), getDepthType()));
// force disable depth test for debugging
// setDepthMode({gfx::DepthFunctionType::Always, gfx::DepthMaskType::ReadOnly, {0,1}});
// context.setDepthMode({gfx::DepthFunctionType::Always, gfx::DepthMaskType::ReadOnly, {0,1}});
if (needsStencil && tileID) {
context.setStencilMode(parameters.stencilModeForClipping(tileID->toUnwrapped()));
@@ -176,6 +176,12 @@ void DrawableGL::upload(gfx::UploadPass& uploadPass) {
};
}
for (std::size_t i = 0; i < textureSources.size(); ++i) {
if (const auto& source = textureSources[i]) {
setTexture(source(), static_cast<int32_t>(i));
}
}
const bool texturesNeedUpload = std::any_of(
textures.begin(), textures.end(), [](const auto& tex) { return tex.texture->needsUpload(); });