How sancyan/falconengine works
Purpose and Entry Points
This is a documentation-first Khronos Vulkan Tutorial repository, published through Antora and backed by progressively complete C++/Vulkan examples. Primary content starts at en/00_Introduction.adoc; documentation navigation is defined in antora/modules/ROOT/nav.adoc and built from antora/antora.yml. Runnable sample entry points include chapter snapshots in attachments/*.cpp and the engine executable at attachments/simple_engine/main.cpp.
Tutorial Progression and Reference Implementations
The main tutorial is a staged learning path: Vulkan setup, presentation, pipeline creation, command submission, resource uploads, textures/models, compute, platform support, multithreading, and ray tracing. Each numbered attachment represents a self-contained implementation stage, rather than a shared production library. Representative endpoints are attachments/00_base_code.cpp, attachments/15_hello_triangle.cpp, and attachments/38_ray_tracing.cpp; their paired Slang/GLSL shader sources sit alongside relevant stages.
Vulkan Runtime Boundary
Examples target Vulkan 1.4 concepts with Vulkan-Hpp RAII, dynamic rendering, timeline semaphores, and Slang as the primary shader language. The central boundary is application-side C++ submitting GPU work through Vulkan devices, queues, swapchains, command buffers, descriptors, and pipelines. Build/dependency discovery is rooted in attachments/CMakeLists.txt, attachments/CMake/FindVulkanHpp.cmake, and attachments/CMake/FindVulkan.cmake.
Rendering Data Flow
The tutorial’s canonical frame flow is: create instance/device/surface; select presentation configuration; create swapchain image views; assemble shaders and graphics pipeline; record commands; acquire-render-present; recreate swapchain when invalidated. This maps directly to attachments/04_logical_device.cpp, attachments/06_swap_chain_creation.cpp, and attachments/17_swap_chain_recreation.cpp. GPU asset flow extends from CPU staging buffers through vertex/index/uniform/texture resources to descriptor-bound shaders, e.g. attachments/20_staging_buffer.cpp, attachments/23_descriptor_sets.cpp, and attachments/29_mipmapping.cpp.
Simple Engine Architecture
attachments/simple_engine/ is the advanced, integrated reference application behind the “Building a Simple Engine” course. attachments/simple_engine/engine.cpp coordinates platform, scene, subsystem, and renderer lifecycle; attachments/simple_engine/main.cpp launches it. Entity/component state is modeled by attachments/simple_engine/entity.cpp, attachments/simple_engine/component.h, and specialized components such as transforms, meshes, cameras, and animation.
Engine Rendering and Assets
The engine separates Vulkan-device/platform ownership from renderer implementation and pipeline/resource management. Core rendering is distributed across attachments/simple_engine/renderer_core.cpp, attachments/simple_engine/renderer_rendering.cpp, and attachments/simple_engine/renderer_rendergraph.h; compute and ray-query paths are in attachments/simple_engine/renderer_compute.cpp and attachments/simple_engine/renderer_ray_query.cpp. Scene/model ingestion and resource ownership are bounded by attachments/simple_engine/scene_loading.cpp, attachments/simple_engine/model_loader.cpp, and attachments/simple_engine/resource_manager.cpp. Slang shaders, including PBR, culling, lighting, and ray-query code, reside in attachments/simple_engine/shaders/.
Platforms, Dependencies, and Automation
Desktop samples use CMake/C++20 and external Vulkan SDK, GLFW, GLM, stb, tinyobjloader, KTX, and glTF-related dependencies. Android packaging bridges Java activity lifecycle to native Vulkan/CMake code at attachments/android/app/src/main/java/com/vulkan/tutorial/VulkanActivity.java and attachments/android/app/src/main/cpp/game_activity_bridge.cpp; the engine has an equivalent Android target under attachments/simple_engine/android/. GitHub Actions build documentation, quality checks, and the simple engine via .github/workflows/build-antora-doc.yml, .github/workflows/quality-checks.yml, and .github/workflows/simple_engine_ci.yml.
Main entry points: renderer_core.cpp Renderer core · engine.cpp Engine lifecycle · 00_base_code.cpp Chapter snapshots · main.cpp Engine executable
Components 19
Documentation
Antora-published tutorial content.
- Tutorial introduction
en/00_Introduction.adoc - Documentation navigation
antora/modules/ROOT/nav.adoc - Antora site build
antora/antora.yml
Tutorial Samples
Progressive standalone Vulkan implementations.
- Chapter snapshots · Each numbered source is a self-contained tutorial stage.
attachments/00_base_code.cpp - Triangle stage
attachments/15_hello_triangle.cpp - Ray tracing stage
attachments/38_ray_tracing.cpp - Device setup
attachments/04_logical_device.cpp - Swapchain lifecycle · Creates presentation images and recreates invalidated swapchains.
attachments/06_swap_chain_creation.cpp - GPU resource flow · Stages assets into descriptor-bound buffers and textures.
attachments/20_staging_buffer.cpp
Simple Engine
Integrated advanced reference application.
- Engine executable
attachments/simple_engine/main.cpp - Engine lifecycle · Coordinates platform, scene, subsystems, and renderer.
attachments/simple_engine/engine.cpp - Entity components · Entities compose transform, mesh, camera, and animation state.
attachments/simple_engine/entity.cpp - Scene and resources · Loads models and owns scene GPU resources.
attachments/simple_engine/scene_loading.cpp - Renderer core · Owns rendering implementation, pipelines, and render graph.
attachments/simple_engine/renderer_core.cpp - Compute and ray query
attachments/simple_engine/renderer_compute.cpp - Engine shaders · PBR, culling, lighting, and ray-query shader programs.
Build & Platforms
- Sample build discovery · Finds Vulkan and Vulkan-Hpp dependencies for desktop samples.
attachments/CMakeLists.txt - Android native bridge · Bridges Java activity lifecycle to native Vulkan code.
attachments/android/app/src/main/cpp/game_activity_bridge.cpp
CI
- Simple engine CI
.github/workflows/simple_engine_ci.yml
Connections 20
- Antora site build → Documentation navigation: uses
- Documentation navigation → Tutorial introduction: links
- Tutorial introduction → Chapter snapshots: teaches through
- Chapter snapshots → Device setup: progresses to
- Device setup → Swapchain lifecycle: configures presentation
- Swapchain lifecycle → Triangle stage: enables frame rendering
- Triangle stage → GPU resource flow: extends with resources
- GPU resource flow → Ray tracing stage: advances to
- Sample build discovery → Chapter snapshots: builds
- Android native bridge → Chapter snapshots: hosts on Android
- Engine executable → Engine lifecycle: launches
- Engine lifecycle → Entity components: updates
- Engine lifecycle → Scene and resources: loads
- Engine lifecycle → Renderer core: drives frames
- Scene and resources → Renderer core: provides assets
- Entity components → Renderer core: provides scene state
- Renderer core → Compute and ray query: includes
- Renderer core → Engine shaders: binds
- Sample build discovery → Engine executable: builds
- Simple engine CI → Engine executable: builds