Skip to content

Visera Engine

Visera Logo

Visera is a cross-platform engine for modern games and real-time applications. It uses a C++20 modular design and provides a full runtime stack from platform abstraction to rendering, audio, input, and asset pipelines.

Introduction

Visera uses a layered architecture:

  • Core — Foundation: math, containers, type system, concurrency, OS abstraction (file, memory, thread, time), logging, compression, and more.
  • Platform — Platform layer: window, path, file system, and dynamic library loading; supports Windows, macOS, and GLFW-based cross-platform or Null stub implementations.
  • Runtime — Runtime: RHI (Vulkan), graphics (scene, material, render graph), AssetHub, audio, input, task system, UI (ImGui), and 2D physics.

The Engine section in the sidebar follows the same structure as the source: Core, Platform, and Runtime, with one page per module for easy lookup of APIs and concepts.

Section Description
Engine → Core Core library: algorithm, compression, concurrency, containers, delegate, font, image, log, math, meta, OS, traits, types
Engine → Platform Platform: interface, GLFW, Null, Windows, MacOS
Engine → Runtime Runtime: AssetHub, Audio, Global, Graphics, Input, Physics2D, RHI, Tasks, UI, Window

Recent changes

Summary of recent modifications (engine, game, and tooling):

  • Runtime.GraphicsImmediate-mode draw API: FScene removed. Game submits per-frame via SetCamera(FCamera), SubmitLight(FLight), Draw(const IRenderable&) or Draw(const FRenderableMeta&). Data is captured at submit time (FRenderableMeta: InstanceData + Material + Mesh); no TSharedPtr<IRenderable> crosses the thread boundary. Engine calls Render(FWindow*) after OnPreRender to build FRenderTask from accumulated draws/camera/lights and send to the Graphics thread. Engine loop order: OnTickOnPreRenderGraphics->Render(Window)OnPostRender. FRenderData holds DrawCommands (TArray<FRenderableMeta>) and Lights; BatchAndSort iterates draw commands. Channel, RegisterPass, PipelineCache, RenderGraph unchanged. See Framework, RenderGraph, Scene.Renderable.
  • Runtime.Graphics.Scene.Camera — Docs: FCamera API, left-handed, lazy matrices, Euler Yaw–Pitch–Roll. See Camera.
  • Core.Types.PathFPath::NormalizeString now preserves a leading slash for absolute paths (fixes shader/material loading from app bundle on macOS).
  • Runtime.Input — Mouse cursor position is in framebuffer (pixel) space: on macOS/Retina the GLFW window multiplies cursor coordinates by content scale before notifying Input. Keyboard key storage uses a dense array Keys[FirstKey..LastKey] with offset in GetKey, avoiding unused slots for low key codes.
  • Platform.GLFW.Window — Cursor position callback scales by GetScaleX()/GetScaleY(); SetContentScale updates scale when the window content-scale callback fires (e.g. moving to another monitor).
  • Game / Scripting — Scripting bindings keep a list of created applications (State->Apps); CreateApplication returns TSharedPtr<FViseraApp>. Mouse position exposed to scripts via GetCursor().Position. Engine terminate clears Apps before resetting the engine.
  • Game (Verdandi) — Demo uses background material and sky texture, R8G8B8A8_UNorm scene color, black clear; sprite push constants include GlowRadius (from left-button hold duration); hit test uses cursor AABB and glow radius; window size read each frame for resize.