aboutsummaryrefslogtreecommitdiff
path: root/src/core/application.cpp
diff options
context:
space:
mode:
authorhachem <im@hachem.wtf>2026-08-24 18:28:39 +0200
committerhachem <im@hachem.wtf>2026-08-24 18:28:39 +0200
commita34c49f103c8950a57687ea3d866c244d95b4414 (patch)
treeff268f4a7f52769a252443d6f2822c9814e3bb1c /src/core/application.cpp
parent06398a7a176e123506de6e8851866a8bec0b3427 (diff)
[docs]: added a few comments cause i wont be able to read this in a week's time
Diffstat (limited to 'src/core/application.cpp')
-rw-r--r--src/core/application.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/core/application.cpp b/src/core/application.cpp
index c24e029..5a3a21b 100644
--- a/src/core/application.cpp
+++ b/src/core/application.cpp
@@ -17,7 +17,7 @@ namespace Donut
{
Application* Application::s_instance = nullptr;
- // Scroll is delivered through a GLFW callback; accumulate it here and drain it
+ // scroll is delivered through a GLFW callback; accumulate it here and drain it
// once per frame in update_input (chaining ImGui's own scroll handler).
static double g_scroll_accum = 0.0;
static GLFWscrollfun g_prev_scroll = nullptr;
@@ -31,7 +31,7 @@ namespace Donut
{
s_instance = this;
- // Select the render API before the window is created: the window is built
+ // select the render API before the window is created: the window is built
// differently for Vulkan (GLFW_NO_API) than for OpenGL.
Logger::init();
SettingsManager::initialize();
@@ -79,7 +79,7 @@ namespace Donut
m_ui = create_scope<UILayer>();
m_device->init_imgui();
- // Load the UI font into the device-created ImGui context (backend-agnostic;
+ // load the UI font into the device-created ImGui context (backend-agnostic;
// the backend rebuilds the atlas on the next frame).
ImGuiIO& io = ImGui::GetIO();
if (!io.Fonts->AddFontFromFileTTF("assets/fonts/inter/static/Inter_18pt-Regular.ttf", 16.0f))
@@ -103,7 +103,7 @@ namespace Donut
if (!m_minimized && m_device)
render_frame();
- // With vsync off, cap to the target FPS (vsync itself paces otherwise).
+ // with vsync off, cap to the target FPS (vsync itself paces otherwise).
if (!SettingsManager::get_v_sync_enabled())
{
int fps = SettingsManager::get_target_fps();
@@ -159,8 +159,8 @@ namespace Donut
m_device->imgui_new_frame();
- // Keep the scene camera's projection current before the UI builds, so the
- // scene-tab gizmo and the render agree on the same matrices this frame.
+ // keep the scene camera's projection current before the UI builds, so the
+ // scene-view gizmo and the render agree on the same matrices this frame.
int w = 0, h = 0;
glfwGetFramebufferSize((GLFWwindow*)m_window->get_native_window(), &w, &h);
m_scene->scene_camera.set_projection(45.0f, (float)w / (float)std::max(h, 1), 0.1f, 1000.0f);
@@ -188,11 +188,11 @@ namespace Donut
glfwGetCursorPos(window, &mx, &my);
bool left_down = glfwGetMouseButton(window, GLFW_MOUSE_BUTTON_LEFT) == GLFW_PRESS;
- // Tabs without a live viewport (Setup / Export) have no camera to drive.
+ // a None view has no live viewport, so there's no camera to drive.
if (view == View::None)
{
m_left_was_down = left_down; // keep the drag-edge state coherent
- g_scroll_accum = 0.0; // discard scroll over inert tabs
+ g_scroll_accum = 0.0; // no live view: nothing to scroll
m_user_moving = false;
return;
}