Add offscreen render targets and rename AssetRegistry to ResourceRegistry #8

Merged
burkkyy merged 26 commits from dev into main 2026-09-25 20:39:26 -07:00
Showing only changes of commit 6e12d8a710 - Show all commits
+9 -6
View File
@@ -84,7 +84,10 @@ class Application::Impl {
auto& renderTargetPool = this->resourceRegistry.renderTargetPool; auto& renderTargetPool = this->resourceRegistry.renderTargetPool;
PanelRegistry& panelRegistry = this->application.panelRegistry; PanelRegistry& panelRegistry = this->application.panelRegistry;
const SceneViewRegistry& sceneViews = this->application.sceneViewRegistry; SceneRegistry& sceneRegistry = this->application.sceneRegistry;
SceneViewRegistry& sceneViewRegistry = this->application.sceneViewRegistry;
const SceneViewRegistry& sceneViewRegistryConst =
this->application.sceneViewRegistry;
imguiRenderer.setDefaultLayout(panelRegistry.getDefaultLayout()); imguiRenderer.setDefaultLayout(panelRegistry.getDefaultLayout());
@@ -143,9 +146,9 @@ class Application::Impl {
graph.importImage(renderContext.getCurrentImage(), Access::Present); graph.importImage(renderContext.getCurrentImage(), Access::Present);
std::map<RenderTargetHandle, ImageRef> viewTargets; std::map<RenderTargetHandle, ImageRef> viewTargets;
for (SceneViewHandle handle : sceneViews.GetRenderQueue()) { for (SceneViewHandle handle : sceneViewRegistryConst.GetRenderQueue()) {
const SceneView& view = sceneViews.get(handle); const SceneView& view = sceneViewRegistryConst.get(handle);
if (!this->application.sceneRegistry.isAlive(view.scene) || if (!sceneRegistry.isAlive(view.scene) ||
!renderTargetPool.isAlive(view.target)) { !renderTargetPool.isAlive(view.target)) {
continue; continue;
} }
@@ -167,8 +170,8 @@ class Application::Impl {
: vk::AttachmentLoadOp::eLoad, : vk::AttachmentLoadOp::eLoad,
{color.r, color.g, color.b, color.a}); {color.r, color.g, color.b, color.a});
}, },
[&sceneRenderer, &sceneViews, handle](vk::CommandBuffer) { [&sceneRenderer, &sceneViewRegistry, handle](vk::CommandBuffer) {
const SceneView& view = sceneViews.get(handle); const SceneView& view = sceneViewRegistry.get(handle);
if (view.camera) { if (view.camera) {
sceneRenderer.render(view); sceneRenderer.render(view);
} }