Files
ToastconcernandClaude Opus 5.5 f7345a5ac3 Frame Studio and Frame Home: cross-platform builds
Frame Studio now builds for Windows (x64, x86, ARM64), Linux (x64, x86, ARM64)
and macOS (Apple Silicon, Intel):
- studio/platform.h with Win32 and POSIX implementations (dialogs through
  tinyfiledialogs on Linux/macOS), a GLFW window beside the Win32 one, and a
  platform-neutral frame pacer
- MoltenVK support in the renderer (portability enumeration) and bundled in
  the macOS app
- 32-bit builds: large-address-aware, LZMA packing within a 32-bit address space
- unaligned file reads in the loaders go through loadUnaligned (no UB)
- scripts/build-studio.sh, studio/build_windows.bat [x64|x86|arm64],
  cmake/llvm-mingw.cmake, and a GitHub Actions workflow building every target

Frame Home installs without Studio: frame/install-frame-home.{sh,ps1} and
"Install Frame Home.bat" (packaged as FrameHome-installer.zip).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 12:03:25 -05:00

25 lines
1.1 KiB
C++

// Global load-progress state shared between the loader worker thread and the UI thread.
// The loaders (scene_loader/gltf_loader/opa_loader) and main's load phase update it at coarse
// checkpoints; the splash painter / editor loading bar read it every frame. Lock-free: the stage
// string must be a STATIC string literal (the reader dereferences it at any time).
#pragma once
#include <atomic>
struct LoadProgress {
std::atomic<const char*> stage{"Starting..."};
std::atomic<int> cur{0}; // items done in this stage (0/0 = indeterminate marquee)
std::atomic<int> total{0};
std::atomic<bool> done{false}; // worker finished (ok or failed)
std::atomic<bool> failed{false};
void set(const char* stageLit, int c = 0, int t = 0) {
cur.store(c, std::memory_order_relaxed);
total.store(t, std::memory_order_relaxed);
stage.store(stageLit, std::memory_order_relaxed);
}
void tick(int c) { cur.store(c, std::memory_order_relaxed); }
void bump() { cur.fetch_add(1, std::memory_order_relaxed); }
};
inline LoadProgress g_loadProgress;