Drawable Renderer (#1570), Remove layer index from drawables.

Add debug GL groups for uploads.
Enable GL debug groups only in debug builds.
This commit is contained in:
Tim Sylvester
2023-05-30 14:04:18 -07:00
committed by Bart Louwers
parent 8986bce151
commit c10616aec6
9 changed files with 26 additions and 70 deletions

View File

@@ -103,20 +103,6 @@ void Renderer::Impl::render(const RenderTree& renderTree) {
// Run changes
orchestrator.processChanges();
// Collect drawables
std::vector<gfx::DrawablePtr> drawables(orchestrator.getDrawables().size());
std::transform(orchestrator.getDrawables().begin(),
orchestrator.getDrawables().end(),
drawables.begin(),
std::bind(&RenderOrchestrator::DrawableMap::value_type::second, std::placeholders::_1));
// Run tweakers to update any dynamic elements
for (auto& drawable : drawables) {
for (auto& tweaker : drawable->getTweakers()) {
tweaker->execute(*drawable, parameters);
}
}
// Run layer tweakers to update any dynamic elements
orchestrator.observeLayerGroups([&](LayerGroup& layerGroup) {
if (layerGroup.getLayerTweaker()) {
@@ -127,9 +113,6 @@ void Renderer::Impl::render(const RenderTree& renderTree) {
// Give the layers a chance to do setup
orchestrator.observeLayerGroups([&](LayerGroup& layerGroup) { layerGroup.preRender(orchestrator, parameters); });
// Sort the drawables
std::sort(drawables.begin(), drawables.end(), gfx::DrawablePtrLessByLayer(/*descending=*/true));
// - UPLOAD PASS -------------------------------------------------------------------------------
// Uploads all required buffers and images before we do any actual rendering.
{