From 0f9c7ffc200ba2ef5a463b349a1eccd1453e6078 Mon Sep 17 00:00:00 2001 From: Caleb Burke Date: Sat, 26 Sep 2026 02:18:12 -0700 Subject: [PATCH] view -> sceneView in app class --- editor/main.cpp | 2 +- engine/include/sophia/application.hpp | 2 +- examples/boids_2d/main.cpp | 6 +++--- examples/image_viewer/main.cpp | 6 +++--- testbed/main.cpp | 9 +++++---- 5 files changed, 13 insertions(+), 12 deletions(-) diff --git a/editor/main.cpp b/editor/main.cpp index b95d944..98c410e 100644 --- a/editor/main.cpp +++ b/editor/main.cpp @@ -28,7 +28,7 @@ class Editor : public sophia::Application { panels().emplace(); sophia::RenderTargetHandle sceneTarget = resources().create(); - views().create({.scene = sceneHandle, .target = sceneTarget}); + sceneViews().create({.scene = sceneHandle, .target = sceneTarget}); panels().emplace(ui(), sceneTarget, scene, selected); panels().setDefaultLayout( diff --git a/engine/include/sophia/application.hpp b/engine/include/sophia/application.hpp index a1e5c6c..834f874 100644 --- a/engine/include/sophia/application.hpp +++ b/engine/include/sophia/application.hpp @@ -47,7 +47,7 @@ class Application { ResourceRegistryRef resources(); PanelRegistry& panels() { return this->panelRegistry; } SceneRegistry& scenes() { return this->sceneRegistry; } - SceneViewRegistry& views() { return this->sceneViewRegistry; } + SceneViewRegistry& sceneViews() { return this->sceneViewRegistry; } UI& ui() { return this->_ui; } DebugUI& debugUI() { return this->_debugUI; } diff --git a/examples/boids_2d/main.cpp b/examples/boids_2d/main.cpp index 9d34a50..f2f19e8 100644 --- a/examples/boids_2d/main.cpp +++ b/examples/boids_2d/main.cpp @@ -126,9 +126,9 @@ class Boids2D : public sophia::Application { } target = resources().create(); - views().create({.scene = sceneHandle, - .target = target, - .clearColor = {0.01f, 0.01f, 0.02f, 1.0f}}); + sceneViews().create({.scene = sceneHandle, + .target = target, + .clearColor = {0.01f, 0.01f, 0.02f, 1.0f}}); panels().emplace(ui(), target); panels().setDefaultLayout({.center = {"Boids"}}); diff --git a/examples/image_viewer/main.cpp b/examples/image_viewer/main.cpp index 7559565..4930fa2 100644 --- a/examples/image_viewer/main.cpp +++ b/examples/image_viewer/main.cpp @@ -51,9 +51,9 @@ class ImageViewer : public sophia::Application { sophia::SpriteComponent{.texture = texture, .size = imageSize}); target = resources().create(); - views().create({.scene = sceneHandle, - .target = target, - .clearColor = {0.1f, 0.1f, 0.15f, 1.f}}); + sceneViews().create({.scene = sceneHandle, + .target = target, + .clearColor = {0.1f, 0.1f, 0.15f, 1.f}}); panels().emplace(ui(), target); // panels().setDefaultLayout({.center = {"Image"}}); diff --git a/testbed/main.cpp b/testbed/main.cpp index 453c229..ba7c6f5 100644 --- a/testbed/main.cpp +++ b/testbed/main.cpp @@ -27,11 +27,12 @@ class Testbed : public sophia::Application { Testbed() : Application{{.width = 750, .height = 1000, .name = "Testbed"}} {} void onCreate() override { - view = views().create({.scene = scenes().create(), - .target = resources().create(), - .clearColor = {0.1f, 0.1f, 0.15f, 1.f}}); + view = sceneViews().create( + {.scene = scenes().create(), + .target = resources().create(), + .clearColor = {0.1f, 0.1f, 0.15f, 1.f}}); - panels().emplace(ui(), views().get(view).target); + panels().emplace(ui(), sceneViews().get(view).target); } private: