diff --git a/docs/FrameResources.md b/docs/FrameResources.md index ea98155..8d2002e 100644 --- a/docs/FrameResources.md +++ b/docs/FrameResources.md @@ -2,7 +2,7 @@ Per-frame struct that owns the command buffer, semaphores/fence, a transient descriptor allocator, and a small deletion queue. Frames are indexed by `FRAME_OVERLAP` (currently 2) and rotated by `_frameNumber` in `VulkanEngine`. -- File: `src/core/frame_resources.h/.cpp` +- File: `src/core/frame/resources.h/.cpp` ### Responsibilities - Command recording: `_mainCommandBuffer` allocated from a per-frame `_commandPool` with RESET flag. diff --git a/docs/IBL.md b/docs/IBL.md index c8a7ec0..8995b32 100644 --- a/docs/IBL.md +++ b/docs/IBL.md @@ -1,7 +1,7 @@ Image-Based Lighting (IBL) Overview -- IBL assets (environment maps + BRDF LUT + SH coefficients) are managed by `IBLManager` (`src/core/ibl_manager.{h,cpp}`) and exposed to passes via `EngineContext::ibl`. +- IBL assets (environment maps + BRDF LUT + SH coefficients) are managed by `IBLManager` (`src/core/assets/ibl_manager.{h,cpp}`) and exposed to passes via `EngineContext::ibl`. - Shaders share a common include, `shaders/ibl_common.glsl`, which defines the IBL bindings for descriptor set 3 and helper functions used by deferred, forward, and background passes. - The engine currently supports: - Specular environment from an equirectangular 2D texture with prefiltered mips (`sampler2D iblSpec2D`). @@ -11,7 +11,7 @@ Overview Data Flow - Init: - `VulkanEngine::init_vulkan()` creates an `IBLManager`, calls `init(context)`, and publishes it via `EngineContext::ibl`. - - The engine optionally loads default IBL assets (`IBLPaths` in `src/core/vk_engine.cpp`), typically a BRDF LUT plus a specular environment `.ktx2`. + - The engine optionally loads default IBL assets (`IBLPaths` in `src/core/engine.cpp`), typically a BRDF LUT plus a specular environment `.ktx2`. - Loading (IBLManager): - `IBLManager::load(const IBLPaths&)`: - Specular: diff --git a/docs/MultiLighting.md b/docs/MultiLighting.md index 596d96a..04f5609 100644 --- a/docs/MultiLighting.md +++ b/docs/MultiLighting.md @@ -2,7 +2,7 @@ Extends the rendering pipeline to support multiple dynamic point lights alongside the existing directional sun light. All lighting calculations use a shared PBR (Cook-Torrance) BRDF implementation. -- Files: `src/scene/vk_scene.h/.cpp`, `src/core/vk_types.h`, `shaders/lighting_common.glsl` +- Files: `src/scene/vk_scene.h/.cpp`, `src/core/types.h`, `shaders/lighting_common.glsl` ### Data Structures diff --git a/docs/RayTracing.md b/docs/RayTracing.md index f55d87c..a2938e6 100644 --- a/docs/RayTracing.md +++ b/docs/RayTracing.md @@ -2,7 +2,7 @@ Optional subsystem that enables hybrid or full ray traced shadows via Ray Query. It builds and caches BLAS per mesh and rebuilds a TLAS from the current `DrawContext` when enabled. -- Files: `src/core/vk_raytracing.h/.cpp` +- Files: `src/core/raytracing/raytracing.h/.cpp` ### Device Feature & Extension Enablement - Feature detection happens in `DeviceManager::init_vulkan()` and sets: diff --git a/docs/RenderGraph.md b/docs/RenderGraph.md index 9362a3b..be1506d 100644 --- a/docs/RenderGraph.md +++ b/docs/RenderGraph.md @@ -10,7 +10,7 @@ Lightweight render graph that builds a per‑frame DAG from pass declarations, c ### High‑Level Flow -- Engine creates the graph each frame and imports swapchain/G‑Buffer images: `src/core/vk_engine.cpp:303`. +- Engine creates the graph each frame and imports swapchain/G‑Buffer images: `src/core/engine.cpp:303`. - Each pass registers its work by calling `register_graph(graph, ...)` and declaring resources via a builder. - The graph appends a present chain (copy HDR `drawImage` → swapchain, then transition to `PRESENT`), optionally inserting ImGui before present. - `compile()` topologically sorts passes by data dependencies (read/write) and computes per‑pass barriers. @@ -112,7 +112,7 @@ Buffer usage → stage/access examples: ### Built‑In Pass Wiring (Current) - Resource uploads (if any) → Background (compute) → Geometry (G‑Buffer) → Lighting (deferred) → Transparent → CopyToSwapchain → ImGui → PreparePresent. -- See registrations: `src/core/vk_engine.cpp:321`–`src/core/vk_engine.cpp:352`. +- See registrations: `src/core/engine.cpp:321`–`src/core/engine.cpp:352`. ### Notes & Limits diff --git a/docs/ResourceManager.md b/docs/ResourceManager.md index 0c43b95..7133b9e 100644 --- a/docs/ResourceManager.md +++ b/docs/ResourceManager.md @@ -9,7 +9,7 @@ Central allocator and uploader built on VMA. Provides creation helpers, an immed - Integrate with `FrameResources` deletion queues to match lifetimes to the frame. - Expose a Render Graph pass that batches all pending uploads. -### Key APIs (src/core/vk_resource.h) +### Key APIs (src/core/frame/resource.h) - Creation - `AllocatedBuffer create_buffer(size, usage, memUsage)` @@ -37,7 +37,7 @@ Central allocator and uploader built on VMA. Provides creation helpers, an immed ### Render Graph Interaction -- `register_upload_pass` is called during frame build before other passes (see `src/core/vk_engine.cpp:315`). +- `register_upload_pass` is called during frame build before other passes (see `src/core/engine.cpp:315`). - It uses graph `import_buffer` / `import_image` to deduplicate external resources and attach initial stage/layout. - Barriers and final layouts for uploaded images are handled in the pass recording (`generate_mipmaps` path transitions to `SHADER_READ_ONLY_OPTIMAL`). diff --git a/docs/TextureLoading.md b/docs/TextureLoading.md index 97255bd..404a888 100644 --- a/docs/TextureLoading.md +++ b/docs/TextureLoading.md @@ -1,12 +1,12 @@ Texture Loading & Streaming Overview -- Streaming cache: `src/core/texture_cache.{h,cpp}` asynchronously decodes images (stb_image) on a small worker pool (1–4 threads, clamped by hardware concurrency) and uploads them via `ResourceManager` with optional mipmaps. For FilePath keys, a sibling `.ktx2` (or direct `.ktx2`) is preferred over PNG/JPEG. Descriptors registered up‑front are patched in‑place once the texture becomes resident. Large decodes can be downscaled on workers before upload to cap peak memory. -- Uploads: `src/core/vk_resource.{h,cpp}` stages pixel data and either submits immediately or registers a Render Graph transfer pass. Mipmaps use `vkutil::generate_mipmaps(...)` and finish in `SHADER_READ_ONLY_OPTIMAL`. +- Streaming cache: `src/core/assets/texture_cache.{h,cpp}` asynchronously decodes images (stb_image) on a small worker pool (1–4 threads, clamped by hardware concurrency) and uploads them via `ResourceManager` with optional mipmaps. For FilePath keys, a sibling `.ktx2` (or direct `.ktx2`) is preferred over PNG/JPEG. Descriptors registered up‑front are patched in‑place once the texture becomes resident. Large decodes can be downscaled on workers before upload to cap peak memory. +- Uploads: `src/core/frame/resource.{h,cpp}` stages pixel data and either submits immediately or registers a Render Graph transfer pass. Mipmaps use `vkutil::generate_mipmaps(...)` and finish in `SHADER_READ_ONLY_OPTIMAL`. - Integration points: - Materials: layouts use `UPDATE_AFTER_BIND`; descriptors can be rewritten after bind. - glTF loader: `src/scene/vk_loader.cpp` builds keys, requests handles, and registers descriptor patches with the cache. - - Primitives/adhoc: `src/core/asset_manager.cpp` builds materials and registers texture watches. + - Primitives/adhoc: `src/core/assets/manager.cpp` builds materials and registers texture watches. - Visibility: `src/render/passes/geometry.cpp` and `src/render/passes/transparent.cpp` call `TextureCache::markSetUsed(...)` for sets that are actually drawn. - IBL: high‑dynamic‑range environment textures are typically loaded directly as `.ktx2` via `IBLManager` instead of the generic streaming cache. See “Image‑Based Lighting (IBL)” below. @@ -32,11 +32,11 @@ Data Flow - `evictToBudget(bytes)` rewrites watchers to fallbacks, destroys images, and marks entries `Evicted`. Evicted entries can reload automatically when seen again and a short cooldown has passed (default ~2 frames), avoiding immediate thrash. Runtime UI -- ImGui → Debug → Textures (see `src/core/vk_engine.cpp`) +- ImGui → Debug → Textures (see `src/core/engine.cpp`) - Shows: device‑local budget/usage (from VMA), texture streaming budget (~35% of device‑local by default), resident MiB, CPU source MiB, counts per state, and a Top‑N table of consumers. - Controls: `Loads/Frame`, `Upload Budget (MiB)` (byte‑based throttle), `Keep Source Bytes`, `CPU Source Budget (MiB)`, `Max Upload Dimension` (progressive downscale cap), and `Trim To Budget Now`. -Key APIs (src/core/texture_cache.h) +Key APIs (src/core/assets/texture_cache.h) - `TextureHandle request(const TextureKey&, VkSampler)` - `void watchBinding(TextureHandle, VkDescriptorSet, uint32_t binding, VkSampler, VkImageView fallback)` - `void unwatchSet(VkDescriptorSet)` — call before destroying descriptor pools/sets @@ -49,11 +49,11 @@ Defaults & Budgets - Worker threads: 1–4 decode threads depending on hardware. - Loads per pump: default 4. - Upload byte budget: default 128 MiB per frame. -- GPU budget: unlimited until the engine sets one each frame. The engine queries ~35% of device‑local memory (via VMA) and calls `set_gpu_budget_bytes(...)`, then runs `evictToBudget(...)` and `pumpLoads(...)` during the frame loop (`src/core/vk_engine.cpp`). +- GPU budget: unlimited until the engine sets one each frame. The engine queries ~35% of device‑local memory (via VMA) and calls `set_gpu_budget_bytes(...)`, then runs `evictToBudget(...)` and `pumpLoads(...)` during the frame loop (`src/core/engine.cpp`). - CPU source bytes: default budget 64 MiB; `keep_source_bytes` defaults to false. Retention only applies to entries created from Bytes keys. Examples -- Asset materials (`src/core/asset_manager.cpp`) +- Asset materials (`src/core/assets/manager.cpp`) - Create materials with visible fallbacks (checkerboard/white/flat‑normal), then: - Build a key from an asset path, `request(key, sampler)`, and `watchBinding(handle, materialSet, binding, sampler, fallbackView)` for albedo (1), metal‑rough (2), normal (3). - glTF loader (`src/scene/vk_loader.cpp`) @@ -92,7 +92,7 @@ Operational Tips - To debug VMA allocations and name images, set `VE_VMA_DEBUG=1`. Image‑Based Lighting (IBL) Textures -- Manager: `src/core/ibl_manager.{h,cpp}` owns IBL GPU resources and the shared descriptor set layout for set=3. +- Manager: `src/core/assets/ibl_manager.{h,cpp}` owns IBL GPU resources and the shared descriptor set layout for set=3. - Inputs (`IBLPaths`): - `specularCube`: preferred is a GPU‑ready `.ktx2` (BC6H or `R16G16B16A16_SFLOAT`) containing either a cubemap or an equirectangular 2D env with prefiltered mips. - `diffuseCube`: optional `.ktx2` cubemap for diffuse irradiance. If missing, diffuse IBL falls back to SH only. diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 29e8060..6bbac85 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,49 +1,56 @@ # Add source to this project's executable. -add_executable (vulkan_engine +add_executable (vulkan_engine main.cpp - # core - core/vk_types.h - core/vk_initializers.cpp - core/vk_initializers.h - core/vk_images.h - core/vk_images.cpp - core/vk_debug.h - core/vk_debug.cpp - core/vk_descriptors.h - core/vk_descriptors.cpp - core/vk_device.h - core/vk_device.cpp - core/vk_swapchain.h - core/vk_swapchain.cpp - core/vk_resource.h - core/vk_resource.cpp - core/engine_context.h - core/engine_context.cpp - core/vk_descriptor_manager.h - core/vk_descriptor_manager.cpp - core/vk_sampler_manager.h - core/vk_sampler_manager.cpp - core/asset_locator.h - core/asset_locator.cpp - core/asset_manager.h - core/asset_manager.cpp - core/vk_pipeline_manager.h - core/vk_pipeline_manager.cpp - core/frame_resources.h - core/frame_resources.cpp - core/texture_cache.h - core/texture_cache.cpp - core/ktx_loader.h - core/ktx_loader.cpp + # core root + core/types.h core/config.h - core/vk_engine.h - core/vk_engine.cpp - core/vk_engine_ui.cpp - core/vk_raytracing.h - core/vk_raytracing.cpp - core/ibl_manager.h - core/ibl_manager.cpp + core/context.h + core/context.cpp + core/engine.h + core/engine.cpp + core/engine_ui.cpp + # core/device + core/device/device.h + core/device/device.cpp + core/device/swapchain.h + core/device/swapchain.cpp + core/device/resource.h + core/device/resource.cpp + core/device/images.h + core/device/images.cpp + # core/descriptor + core/descriptor/descriptors.h + core/descriptor/descriptors.cpp + core/descriptor/manager.h + core/descriptor/manager.cpp + # core/pipeline + core/pipeline/manager.h + core/pipeline/manager.cpp + core/pipeline/sampler.h + core/pipeline/sampler.cpp + # core/assets + core/assets/locator.h + core/assets/locator.cpp + core/assets/manager.h + core/assets/manager.cpp + core/assets/texture_cache.h + core/assets/texture_cache.cpp + core/assets/ktx_loader.h + core/assets/ktx_loader.cpp + core/assets/ibl_manager.h + core/assets/ibl_manager.cpp + # core/frame + core/frame/resources.h + core/frame/resources.cpp + # core/util + core/util/initializers.h + core/util/initializers.cpp + core/util/debug.h + core/util/debug.cpp + # core/raytracing + core/raytracing/raytracing.h + core/raytracing/raytracing.cpp # render render/pipelines.h render/pipelines.cpp @@ -97,6 +104,13 @@ target_compile_definitions(vulkan_engine PUBLIC GLM_FORCE_DEPTH_ZERO_TO_ONE) target_include_directories(vulkan_engine PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/core" + "${CMAKE_CURRENT_SOURCE_DIR}/core/device" + "${CMAKE_CURRENT_SOURCE_DIR}/core/descriptor" + "${CMAKE_CURRENT_SOURCE_DIR}/core/pipeline" + "${CMAKE_CURRENT_SOURCE_DIR}/core/assets" + "${CMAKE_CURRENT_SOURCE_DIR}/core/frame" + "${CMAKE_CURRENT_SOURCE_DIR}/core/util" + "${CMAKE_CURRENT_SOURCE_DIR}/core/raytracing" "${CMAKE_CURRENT_SOURCE_DIR}/render" "${CMAKE_CURRENT_SOURCE_DIR}/render/passes" "${CMAKE_CURRENT_SOURCE_DIR}/render/graph" diff --git a/src/compute/vk_compute.cpp b/src/compute/vk_compute.cpp index d9f9508..b429a12 100644 --- a/src/compute/vk_compute.cpp +++ b/src/compute/vk_compute.cpp @@ -1,12 +1,12 @@ #include -#include +#include #include -#include +#include #include -#include "vk_device.h" -#include "core/vk_resource.h" -#include "frame_resources.h" +#include "core/device/device.h" +#include "core/device/resource.h" +#include "core/frame/resources.h" ComputeBinding ComputeBinding::uniformBuffer(uint32_t binding, VkBuffer buffer, VkDeviceSize size, VkDeviceSize offset) { diff --git a/src/compute/vk_compute.h b/src/compute/vk_compute.h index 92afa39..21e8147 100644 --- a/src/compute/vk_compute.h +++ b/src/compute/vk_compute.h @@ -1,7 +1,7 @@ # pragma once -#include -#include +#include +#include #include #include #include diff --git a/src/core/ibl_manager.cpp b/src/core/assets/ibl_manager.cpp similarity index 98% rename from src/core/ibl_manager.cpp rename to src/core/assets/ibl_manager.cpp index 0ec160d..d707112 100644 --- a/src/core/ibl_manager.cpp +++ b/src/core/assets/ibl_manager.cpp @@ -1,15 +1,15 @@ #include "ibl_manager.h" -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include #include #include -#include "vk_device.h" +#include "core/device/device.h" bool IBLManager::load(const IBLPaths &paths) { diff --git a/src/core/ibl_manager.h b/src/core/assets/ibl_manager.h similarity index 98% rename from src/core/ibl_manager.h rename to src/core/assets/ibl_manager.h index 8770027..383a44f 100644 --- a/src/core/ibl_manager.h +++ b/src/core/assets/ibl_manager.h @@ -1,6 +1,6 @@ #pragma once -#include +#include #include class EngineContext; diff --git a/src/core/ktx_loader.cpp b/src/core/assets/ktx_loader.cpp similarity index 100% rename from src/core/ktx_loader.cpp rename to src/core/assets/ktx_loader.cpp diff --git a/src/core/ktx_loader.h b/src/core/assets/ktx_loader.h similarity index 98% rename from src/core/ktx_loader.h rename to src/core/assets/ktx_loader.h index f3a481f..2edffbc 100644 --- a/src/core/ktx_loader.h +++ b/src/core/assets/ktx_loader.h @@ -1,6 +1,6 @@ #pragma once -#include +#include #include // Simple KTX2 helpers focused on IBL assets. diff --git a/src/core/asset_locator.cpp b/src/core/assets/locator.cpp similarity index 99% rename from src/core/asset_locator.cpp rename to src/core/assets/locator.cpp index 7c80647..2188be0 100644 --- a/src/core/asset_locator.cpp +++ b/src/core/assets/locator.cpp @@ -1,4 +1,4 @@ -#include "asset_locator.h" +#include "locator.h" #include diff --git a/src/core/asset_locator.h b/src/core/assets/locator.h similarity index 100% rename from src/core/asset_locator.h rename to src/core/assets/locator.h diff --git a/src/core/asset_manager.cpp b/src/core/assets/manager.cpp similarity index 99% rename from src/core/asset_manager.cpp rename to src/core/assets/manager.cpp index ca38413..549466c 100644 --- a/src/core/asset_manager.cpp +++ b/src/core/assets/manager.cpp @@ -1,17 +1,17 @@ -#include "asset_manager.h" +#include "manager.h" #include #include -#include -#include +#include +#include #include #include #include #include #include -#include "asset_locator.h" -#include +#include "locator.h" +#include #include #include #include diff --git a/src/core/asset_manager.h b/src/core/assets/manager.h similarity index 98% rename from src/core/asset_manager.h rename to src/core/assets/manager.h index a1f39d2..f003403 100644 --- a/src/core/asset_manager.h +++ b/src/core/assets/manager.h @@ -10,10 +10,10 @@ #include #include -#include +#include -#include "materials.h" -#include "asset_locator.h" +#include "render/materials.h" +#include "locator.h" class VulkanEngine; class MeshAsset; diff --git a/src/core/texture_cache.cpp b/src/core/assets/texture_cache.cpp similarity index 99% rename from src/core/texture_cache.cpp rename to src/core/assets/texture_cache.cpp index 91044c8..127c89a 100644 --- a/src/core/texture_cache.cpp +++ b/src/core/assets/texture_cache.cpp @@ -1,15 +1,15 @@ #include "texture_cache.h" -#include -#include -#include +#include +#include +#include #include #include #include "stb_image.h" #include #include #include -#include "vk_device.h" +#include "core/device/device.h" #include #include #include diff --git a/src/core/texture_cache.h b/src/core/assets/texture_cache.h similarity index 99% rename from src/core/texture_cache.h rename to src/core/assets/texture_cache.h index 03a57ba..089fddd 100644 --- a/src/core/texture_cache.h +++ b/src/core/assets/texture_cache.h @@ -1,6 +1,6 @@ #pragma once -#include +#include #include #include #include diff --git a/src/core/engine_context.cpp b/src/core/context.cpp similarity index 90% rename from src/core/engine_context.cpp rename to src/core/context.cpp index a87d289..0de4b87 100644 --- a/src/core/engine_context.cpp +++ b/src/core/context.cpp @@ -1,4 +1,4 @@ -#include "engine_context.h" +#include "context.h" #include "scene/vk_scene.h" const GPUSceneData &EngineContext::getSceneData() const diff --git a/src/core/engine_context.h b/src/core/context.h similarity index 98% rename from src/core/engine_context.h rename to src/core/context.h index a063098..dad4511 100644 --- a/src/core/engine_context.h +++ b/src/core/context.h @@ -1,8 +1,8 @@ #pragma once #include -#include -#include +#include +#include // Avoid including vk_scene.h here to prevent cycles struct EngineStats diff --git a/src/core/vk_descriptors.cpp b/src/core/descriptor/descriptors.cpp similarity index 99% rename from src/core/vk_descriptors.cpp rename to src/core/descriptor/descriptors.cpp index f4892ba..8671daf 100644 --- a/src/core/vk_descriptors.cpp +++ b/src/core/descriptor/descriptors.cpp @@ -1,4 +1,4 @@ -#include +#include void DescriptorLayoutBuilder::add_binding(uint32_t binding, VkDescriptorType type, uint32_t count) { diff --git a/src/core/vk_descriptors.h b/src/core/descriptor/descriptors.h similarity index 98% rename from src/core/vk_descriptors.h rename to src/core/descriptor/descriptors.h index 42b71d1..08fa479 100644 --- a/src/core/vk_descriptors.h +++ b/src/core/descriptor/descriptors.h @@ -1,6 +1,6 @@ #pragma once -#include +#include struct DescriptorLayoutBuilder diff --git a/src/core/vk_descriptor_manager.cpp b/src/core/descriptor/manager.cpp similarity index 94% rename from src/core/vk_descriptor_manager.cpp rename to src/core/descriptor/manager.cpp index 4a0a122..bf02d78 100644 --- a/src/core/vk_descriptor_manager.cpp +++ b/src/core/descriptor/manager.cpp @@ -1,6 +1,6 @@ -#include "vk_descriptor_manager.h" -#include "vk_device.h" -#include "vk_descriptors.h" +#include "manager.h" +#include "core/device/device.h" +#include "descriptors.h" void DescriptorManager::init(DeviceManager *deviceManager) { diff --git a/src/core/vk_descriptor_manager.h b/src/core/descriptor/manager.h similarity index 85% rename from src/core/vk_descriptor_manager.h rename to src/core/descriptor/manager.h index 79b2091..f9b9dc3 100644 --- a/src/core/vk_descriptor_manager.h +++ b/src/core/descriptor/manager.h @@ -1,9 +1,9 @@ #pragma once -#include -#include +#include +#include -#include "vk_device.h" +#include "device/device.h" class DeviceManager; diff --git a/src/core/vk_device.cpp b/src/core/device/device.cpp similarity index 99% rename from src/core/vk_device.cpp rename to src/core/device/device.cpp index 81a54ca..a25edc7 100644 --- a/src/core/vk_device.cpp +++ b/src/core/device/device.cpp @@ -1,4 +1,4 @@ -#include "vk_device.h" +#include "device.h" #include "config.h" #include "SDL2/SDL.h" #include "SDL2/SDL_vulkan.h" diff --git a/src/core/vk_device.h b/src/core/device/device.h similarity index 98% rename from src/core/vk_device.h rename to src/core/device/device.h index 1587439..0ce3107 100644 --- a/src/core/vk_device.h +++ b/src/core/device/device.h @@ -1,5 +1,5 @@ #pragma once -#include +#include #include "VkBootstrap.h" diff --git a/src/core/vk_images.cpp b/src/core/device/images.cpp similarity index 98% rename from src/core/vk_images.cpp rename to src/core/device/images.cpp index 5e0f65d..9a6d539 100644 --- a/src/core/vk_images.cpp +++ b/src/core/device/images.cpp @@ -1,11 +1,11 @@ -#include -#include +#include +#include #define STB_IMAGE_IMPLEMENTATION #include "stb_image.h" //> transition -#include +#include void vkutil::transition_image(VkCommandBuffer cmd, VkImage image, VkImageLayout currentLayout, VkImageLayout newLayout) { diff --git a/src/core/vk_images.h b/src/core/device/images.h similarity index 95% rename from src/core/vk_images.h rename to src/core/device/images.h index 379a447..592dbe9 100644 --- a/src/core/vk_images.h +++ b/src/core/device/images.h @@ -1,5 +1,5 @@ #pragma once -#include +#include namespace vkutil { diff --git a/src/core/vk_resource.cpp b/src/core/device/resource.cpp similarity index 99% rename from src/core/vk_resource.cpp rename to src/core/device/resource.cpp index 5ee002b..48cbeeb 100644 --- a/src/core/vk_resource.cpp +++ b/src/core/device/resource.cpp @@ -1,14 +1,14 @@ -#include "vk_resource.h" -#include "vk_device.h" -#include "vk_images.h" -#include "vk_initializers.h" +#include "resource.h" +#include "device.h" +#include "images.h" +#include "core/util/initializers.h" #include "vk_mem_alloc.h" #include #include #include -#include "frame_resources.h" +#include "core/frame/resources.h" #include #include diff --git a/src/core/vk_resource.h b/src/core/device/resource.h similarity index 99% rename from src/core/vk_resource.h rename to src/core/device/resource.h index 45f567d..6e67eaf 100644 --- a/src/core/vk_resource.h +++ b/src/core/device/resource.h @@ -1,5 +1,5 @@ #pragma once -#include +#include #include #include diff --git a/src/core/vk_swapchain.cpp b/src/core/device/swapchain.cpp similarity index 99% rename from src/core/vk_swapchain.cpp rename to src/core/device/swapchain.cpp index 1cb49f7..6073e9d 100644 --- a/src/core/vk_swapchain.cpp +++ b/src/core/device/swapchain.cpp @@ -1,11 +1,11 @@ -#include "vk_swapchain.h" +#include "swapchain.h" #include #include "SDL2/SDL_vulkan.h" -#include "vk_device.h" -#include "vk_initializers.h" -#include "vk_resource.h" +#include "device.h" +#include "core/util/initializers.h" +#include "resource.h" // Swapchain + per-frame targets (HDR draw, depth, GBuffer) management. // diff --git a/src/core/vk_swapchain.h b/src/core/device/swapchain.h similarity index 98% rename from src/core/vk_swapchain.h rename to src/core/device/swapchain.h index 7fe4299..4e253d0 100644 --- a/src/core/vk_swapchain.h +++ b/src/core/device/swapchain.h @@ -1,6 +1,6 @@ #pragma once -#include +#include class ResourceManager; class DeviceManager; diff --git a/src/core/vk_engine.cpp b/src/core/engine.cpp similarity index 99% rename from src/core/vk_engine.cpp rename to src/core/engine.cpp index 78c36ad..b03986f 100644 --- a/src/core/vk_engine.cpp +++ b/src/core/engine.cpp @@ -13,12 +13,12 @@ // - docs/RayTracing.md // //> includes -#include "vk_engine.h" +#include "engine.h" #include "SDL2/SDL.h" -#include -#include +#include +#include #include "VkBootstrap.h" @@ -43,11 +43,11 @@ #include "render/passes/transparent.h" #include "render/passes/tonemap.h" #include "render/passes/shadow.h" -#include "vk_resource.h" -#include "engine_context.h" -#include "core/vk_pipeline_manager.h" -#include "core/texture_cache.h" -#include "core/ibl_manager.h" +#include "device/resource.h" +#include "context.h" +#include "core/pipeline/manager.h" +#include "core/assets/texture_cache.h" +#include "core/assets/ibl_manager.h" // ImGui debug UI (tabs, inspectors, etc.) is implemented in core/vk_engine_ui.cpp. void vk_engine_draw_debug_ui(VulkanEngine *eng); diff --git a/src/core/vk_engine.h b/src/core/engine.h similarity index 92% rename from src/core/vk_engine.h rename to src/core/engine.h index 6d3ca3b..70d7349 100644 --- a/src/core/vk_engine.h +++ b/src/core/engine.h @@ -3,36 +3,36 @@ #pragma once -#include +#include #include #include #include #include "vk_mem_alloc.h" #include #include -#include "vk_descriptors.h" +#include "descriptor/descriptors.h" #include "scene/vk_loader.h" #include "compute/vk_compute.h" #include -#include "vk_device.h" +#include "device/device.h" #include "render/renderpass.h" #include "render/passes/background.h" -#include "vk_resource.h" -#include "vk_swapchain.h" +#include "device/resource.h" +#include "device/swapchain.h" #include "scene/vk_scene.h" #include "render/materials.h" -#include "frame_resources.h" -#include "vk_descriptor_manager.h" -#include "vk_sampler_manager.h" -#include "core/engine_context.h" -#include "core/vk_pipeline_manager.h" -#include "core/asset_manager.h" +#include "frame/resources.h" +#include "descriptor/manager.h" +#include "pipeline/sampler.h" +#include "core/context.h" +#include "core/pipeline/manager.h" +#include "core/assets/manager.h" #include "render/graph/graph.h" -#include "core/vk_raytracing.h" -#include "core/texture_cache.h" -#include "core/ibl_manager.h" +#include "core/raytracing/raytracing.h" +#include "core/assets/texture_cache.h" +#include "core/assets/ibl_manager.h" // Number of frames-in-flight. Affects per-frame command buffers, fences, // semaphores, and transient descriptor pools in FrameResources. diff --git a/src/core/vk_engine_ui.cpp b/src/core/engine_ui.cpp similarity index 99% rename from src/core/vk_engine_ui.cpp rename to src/core/engine_ui.cpp index 8ad0a54..823e939 100644 --- a/src/core/vk_engine_ui.cpp +++ b/src/core/engine_ui.cpp @@ -4,7 +4,7 @@ // statistics, render-graph inspection, texture streaming controls, etc. // The main frame loop in vk_engine.cpp simply calls vk_engine_draw_debug_ui(). -#include "vk_engine.h" +#include "engine.h" #include "imgui.h" #include "ImGuizmo.h" @@ -16,11 +16,11 @@ #include #include #include "render/graph/graph.h" -#include "core/vk_pipeline_manager.h" -#include "core/texture_cache.h" -#include "core/ibl_manager.h" -#include "engine_context.h" -#include +#include "core/pipeline/manager.h" +#include "core/assets/texture_cache.h" +#include "core/assets/ibl_manager.h" +#include "context.h" +#include #include "mesh_bvh.h" diff --git a/src/core/frame_resources.cpp b/src/core/frame/resources.cpp similarity index 92% rename from src/core/frame_resources.cpp rename to src/core/frame/resources.cpp index a206773..5cfcaea 100644 --- a/src/core/frame_resources.cpp +++ b/src/core/frame/resources.cpp @@ -1,9 +1,9 @@ -#include "frame_resources.h" +#include "resources.h" #include -#include "vk_descriptors.h" -#include "vk_device.h" -#include "vk_initializers.h" -#include "vk_types.h" +#include "core/descriptor/descriptors.h" +#include "core/device/device.h" +#include "core/util/initializers.h" +#include "core/types.h" void FrameResources::init(DeviceManager *deviceManager, std::span framePoolSizes) diff --git a/src/core/frame_resources.h b/src/core/frame/resources.h similarity index 92% rename from src/core/frame_resources.h rename to src/core/frame/resources.h index d2f3fc3..b97a6fe 100644 --- a/src/core/frame_resources.h +++ b/src/core/frame/resources.h @@ -1,7 +1,7 @@ #pragma once -#include -#include +#include +#include class DeviceManager; diff --git a/src/core/vk_pipeline_manager.cpp b/src/core/pipeline/manager.cpp similarity index 98% rename from src/core/vk_pipeline_manager.cpp rename to src/core/pipeline/manager.cpp index 1e06b2a..591edf0 100644 --- a/src/core/vk_pipeline_manager.cpp +++ b/src/core/pipeline/manager.cpp @@ -1,10 +1,10 @@ -#include +#include -#include -#include +#include +#include #include -#include +#include #include diff --git a/src/core/vk_pipeline_manager.h b/src/core/pipeline/manager.h similarity index 99% rename from src/core/vk_pipeline_manager.h rename to src/core/pipeline/manager.h index 83b4dc7..61d4a55 100644 --- a/src/core/vk_pipeline_manager.h +++ b/src/core/pipeline/manager.h @@ -1,6 +1,6 @@ #pragma once -#include +#include #include #include diff --git a/src/core/vk_sampler_manager.cpp b/src/core/pipeline/sampler.cpp similarity index 97% rename from src/core/vk_sampler_manager.cpp rename to src/core/pipeline/sampler.cpp index 25800f0..51321cc 100644 --- a/src/core/vk_sampler_manager.cpp +++ b/src/core/pipeline/sampler.cpp @@ -1,5 +1,5 @@ -#include "vk_sampler_manager.h" -#include "vk_device.h" +#include "sampler.h" +#include "core/device/device.h" void SamplerManager::init(DeviceManager *deviceManager) { diff --git a/src/core/vk_sampler_manager.h b/src/core/pipeline/sampler.h similarity index 95% rename from src/core/vk_sampler_manager.h rename to src/core/pipeline/sampler.h index 6534687..97bff3b 100644 --- a/src/core/vk_sampler_manager.h +++ b/src/core/pipeline/sampler.h @@ -1,6 +1,6 @@ #pragma once -#include +#include class DeviceManager; diff --git a/src/core/vk_raytracing.cpp b/src/core/raytracing/raytracing.cpp similarity index 99% rename from src/core/vk_raytracing.cpp rename to src/core/raytracing/raytracing.cpp index 0a84498..e2fbd3c 100644 --- a/src/core/vk_raytracing.cpp +++ b/src/core/raytracing/raytracing.cpp @@ -1,7 +1,7 @@ -#include "vk_raytracing.h" -#include "vk_device.h" -#include "vk_resource.h" -#include "vk_initializers.h" +#include "raytracing.h" +#include "core/device/device.h" +#include "core/device/resource.h" +#include "core/util/initializers.h" #include "scene/vk_loader.h" #include "scene/vk_scene.h" #include diff --git a/src/core/vk_raytracing.h b/src/core/raytracing/raytracing.h similarity index 99% rename from src/core/vk_raytracing.h rename to src/core/raytracing/raytracing.h index 4c96fc4..e98bad9 100644 --- a/src/core/vk_raytracing.h +++ b/src/core/raytracing/raytracing.h @@ -1,5 +1,5 @@ #pragma once - #include + #include #include #include #include diff --git a/src/core/vk_types.h b/src/core/types.h similarity index 100% rename from src/core/vk_types.h rename to src/core/types.h diff --git a/src/core/vk_debug.cpp b/src/core/util/debug.cpp similarity index 97% rename from src/core/vk_debug.cpp rename to src/core/util/debug.cpp index 4f074a7..0f4ac60 100644 --- a/src/core/vk_debug.cpp +++ b/src/core/util/debug.cpp @@ -1,4 +1,4 @@ -#include +#include #include diff --git a/src/core/vk_debug.h b/src/core/util/debug.h similarity index 94% rename from src/core/vk_debug.h rename to src/core/util/debug.h index f02a5f8..3c115b3 100644 --- a/src/core/vk_debug.h +++ b/src/core/util/debug.h @@ -1,6 +1,6 @@ #pragma once -#include +#include namespace vkdebug { diff --git a/src/core/vk_initializers.cpp b/src/core/util/initializers.cpp similarity index 99% rename from src/core/vk_initializers.cpp rename to src/core/util/initializers.cpp index 677c871..b258996 100644 --- a/src/core/vk_initializers.cpp +++ b/src/core/util/initializers.cpp @@ -1,4 +1,4 @@ -#include +#include //> init_cmd VkCommandPoolCreateInfo vkinit::command_pool_create_info(uint32_t queueFamilyIndex, diff --git a/src/core/vk_initializers.h b/src/core/util/initializers.h similarity index 99% rename from src/core/vk_initializers.h rename to src/core/util/initializers.h index 77a4545..2ba9b66 100644 --- a/src/core/vk_initializers.h +++ b/src/core/util/initializers.h @@ -3,7 +3,7 @@ #pragma once -#include +#include namespace vkinit { diff --git a/src/main.cpp b/src/main.cpp index 9f9e3b9..ca04d95 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,4 +1,4 @@ -#include "core/vk_engine.h" +#include "core/engine.h" int main(int argc, char* argv[]) { diff --git a/src/render/graph/graph.cpp b/src/render/graph/graph.cpp index 32d3766..513f0fd 100644 --- a/src/render/graph/graph.cpp +++ b/src/render/graph/graph.cpp @@ -1,7 +1,7 @@ #include "graph.h" -#include -#include -#include +#include +#include +#include #include #include @@ -9,12 +9,12 @@ #include #include -#include -#include -#include +#include +#include +#include #include -#include "vk_device.h" +#include "core/device/device.h" #include void RenderGraph::init(EngineContext *ctx) diff --git a/src/render/graph/graph.h b/src/render/graph/graph.h index 1fb0a06..14aca92 100644 --- a/src/render/graph/graph.h +++ b/src/render/graph/graph.h @@ -1,6 +1,6 @@ #pragma once -#include +#include #include #include #include diff --git a/src/render/graph/resources.cpp b/src/render/graph/resources.cpp index e4bff14..cd2557b 100644 --- a/src/render/graph/resources.cpp +++ b/src/render/graph/resources.cpp @@ -1,11 +1,11 @@ #include "resources.h" -#include -#include +#include +#include #include #include -#include "frame_resources.h" -#include "vk_device.h" +#include "core/frame/resources.h" +#include "core/device/device.h" void RGResourceRegistry::reset() { diff --git a/src/render/graph/resources.h b/src/render/graph/resources.h index de3a65a..e7cb88b 100644 --- a/src/render/graph/resources.h +++ b/src/render/graph/resources.h @@ -1,6 +1,6 @@ #pragma once -#include +#include #include #include #include diff --git a/src/render/graph/types.h b/src/render/graph/types.h index 02a8b15..aa42d04 100644 --- a/src/render/graph/types.h +++ b/src/render/graph/types.h @@ -1,6 +1,6 @@ #pragma once -#include +#include #include #include diff --git a/src/render/materials.cpp b/src/render/materials.cpp index 3db2bf9..1177fb6 100644 --- a/src/render/materials.cpp +++ b/src/render/materials.cpp @@ -1,10 +1,10 @@ #include "materials.h" -#include "core/vk_engine.h" +#include "core/engine.h" #include "render/pipelines.h" -#include "core/vk_initializers.h" -#include "core/vk_pipeline_manager.h" -#include "core/asset_manager.h" +#include "core/util/initializers.h" +#include "core/pipeline/manager.h" +#include "core/assets/manager.h" namespace vkutil { bool load_shader_module(const char*, VkDevice, VkShaderModule*); } diff --git a/src/render/materials.h b/src/render/materials.h index c87bc1f..7b135a2 100644 --- a/src/render/materials.h +++ b/src/render/materials.h @@ -1,7 +1,7 @@ #pragma once -#include -#include +#include +#include class VulkanEngine; diff --git a/src/render/passes/background.cpp b/src/render/passes/background.cpp index b600051..9570f78 100644 --- a/src/render/passes/background.cpp +++ b/src/render/passes/background.cpp @@ -1,19 +1,19 @@ #include "background.h" #include -#include "vk_swapchain.h" -#include "core/engine_context.h" -#include "core/vk_resource.h" -#include "core/vk_pipeline_manager.h" -#include "core/asset_manager.h" +#include "core/device/swapchain.h" +#include "core/context.h" +#include "core/device/resource.h" +#include "core/pipeline/manager.h" +#include "core/assets/manager.h" #include "render/graph/graph.h" #include -#include "frame_resources.h" -#include "ibl_manager.h" -#include "vk_descriptor_manager.h" -#include "vk_device.h" -#include "vk_sampler_manager.h" +#include "core/frame/resources.h" +#include "core/assets/ibl_manager.h" +#include "core/descriptor/manager.h" +#include "core/device/device.h" +#include "core/pipeline/sampler.h" void BackgroundPass::init(EngineContext *context) { diff --git a/src/render/passes/geometry.cpp b/src/render/passes/geometry.cpp index 6dd929d..3cf217a 100644 --- a/src/render/passes/geometry.cpp +++ b/src/render/passes/geometry.cpp @@ -3,17 +3,17 @@ #include #include -#include "frame_resources.h" -#include "texture_cache.h" -#include "vk_descriptor_manager.h" -#include "vk_device.h" -#include "core/engine_context.h" -#include "core/vk_initializers.h" -#include "core/vk_resource.h" +#include "core/frame/resources.h" +#include "core/assets/texture_cache.h" +#include "core/descriptor/manager.h" +#include "core/device/device.h" +#include "core/context.h" +#include "core/util/initializers.h" +#include "core/device/resource.h" #include "vk_mem_alloc.h" -#include "vk_scene.h" -#include "vk_swapchain.h" +#include "scene/vk_scene.h" +#include "core/device/swapchain.h" #include "render/graph/graph.h" // Basic conservative frustum test against RenderObject AABB. diff --git a/src/render/passes/imgui_pass.cpp b/src/render/passes/imgui_pass.cpp index cb3a2e1..fafccac 100644 --- a/src/render/passes/imgui_pass.cpp +++ b/src/render/passes/imgui_pass.cpp @@ -3,10 +3,10 @@ #include "imgui.h" #include "imgui_impl_sdl2.h" #include "imgui_impl_vulkan.h" -#include "vk_device.h" -#include "vk_swapchain.h" -#include "core/vk_initializers.h" -#include "core/engine_context.h" +#include "core/device/device.h" +#include "core/device/swapchain.h" +#include "core/util/initializers.h" +#include "core/context.h" #include "render/graph/graph.h" void ImGuiPass::init(EngineContext *context) diff --git a/src/render/passes/imgui_pass.h b/src/render/passes/imgui_pass.h index 921ce43..066e21b 100644 --- a/src/render/passes/imgui_pass.h +++ b/src/render/passes/imgui_pass.h @@ -1,6 +1,6 @@ #pragma once #include "render/renderpass.h" -#include "core/vk_types.h" +#include "core/types.h" #include class ImGuiPass : public IRenderPass diff --git a/src/render/passes/lighting.cpp b/src/render/passes/lighting.cpp index 017dbd9..7f19b32 100644 --- a/src/render/passes/lighting.cpp +++ b/src/render/passes/lighting.cpp @@ -1,26 +1,26 @@ #include "lighting.h" -#include "frame_resources.h" -#include "vk_descriptor_manager.h" -#include "vk_device.h" -#include "core/engine_context.h" -#include "core/vk_initializers.h" -#include "core/vk_resource.h" +#include "core/frame/resources.h" +#include "core/descriptor/manager.h" +#include "core/device/device.h" +#include "core/context.h" +#include "core/util/initializers.h" +#include "core/device/resource.h" #include "render/pipelines.h" -#include "core/vk_pipeline_manager.h" -#include "core/asset_manager.h" -#include "core/vk_descriptors.h" +#include "core/pipeline/manager.h" +#include "core/assets/manager.h" +#include "core/descriptor/descriptors.h" #include "core/config.h" #include "vk_mem_alloc.h" -#include "vk_sampler_manager.h" -#include "vk_swapchain.h" +#include "core/pipeline/sampler.h" +#include "core/device/swapchain.h" #include "render/graph/graph.h" #include #include -#include "ibl_manager.h" -#include "vk_raytracing.h" +#include "core/assets/ibl_manager.h" +#include "core/raytracing/raytracing.h" void LightingPass::init(EngineContext *context) { diff --git a/src/render/passes/shadow.cpp b/src/render/passes/shadow.cpp index 7a3c3a0..93ed6d9 100644 --- a/src/render/passes/shadow.cpp +++ b/src/render/passes/shadow.cpp @@ -3,20 +3,20 @@ #include #include -#include "core/engine_context.h" +#include "core/context.h" #include "render/graph/graph.h" #include "render/graph/builder.h" -#include "vk_swapchain.h" -#include "vk_scene.h" -#include "frame_resources.h" -#include "vk_descriptor_manager.h" -#include "vk_device.h" -#include "vk_resource.h" -#include "core/vk_initializers.h" -#include "core/vk_pipeline_manager.h" -#include "core/asset_manager.h" +#include "core/device/swapchain.h" +#include "scene/vk_scene.h" +#include "core/frame/resources.h" +#include "core/descriptor/manager.h" +#include "core/device/device.h" +#include "core/device/resource.h" +#include "core/util/initializers.h" +#include "core/pipeline/manager.h" +#include "core/assets/manager.h" #include "render/pipelines.h" -#include "core/vk_types.h" +#include "core/types.h" #include "core/config.h" void ShadowPass::init(EngineContext *context) diff --git a/src/render/passes/tonemap.cpp b/src/render/passes/tonemap.cpp index 000e394..919e983 100644 --- a/src/render/passes/tonemap.cpp +++ b/src/render/passes/tonemap.cpp @@ -1,17 +1,17 @@ #include "tonemap.h" -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include -#include "frame_resources.h" +#include "core/frame/resources.h" struct TonemapPush { diff --git a/src/render/passes/tonemap.h b/src/render/passes/tonemap.h index e346515..4cb63a5 100644 --- a/src/render/passes/tonemap.h +++ b/src/render/passes/tonemap.h @@ -1,6 +1,6 @@ #pragma once -#include +#include #include #include diff --git a/src/render/passes/transparent.cpp b/src/render/passes/transparent.cpp index ec73429..342e1bd 100644 --- a/src/render/passes/transparent.cpp +++ b/src/render/passes/transparent.cpp @@ -3,16 +3,16 @@ #include #include -#include "ibl_manager.h" -#include "texture_cache.h" -#include "vk_sampler_manager.h" -#include "vk_scene.h" -#include "vk_swapchain.h" -#include "core/engine_context.h" -#include "core/vk_resource.h" -#include "core/vk_device.h" -#include "core/vk_descriptor_manager.h" -#include "core/frame_resources.h" +#include "core/assets/ibl_manager.h" +#include "core/assets/texture_cache.h" +#include "core/pipeline/sampler.h" +#include "scene/vk_scene.h" +#include "core/device/swapchain.h" +#include "core/context.h" +#include "core/device/resource.h" +#include "core/device/device.h" +#include "core/descriptor/manager.h" +#include "core/frame/resources.h" #include "render/graph/graph.h" void TransparentPass::init(EngineContext *context) diff --git a/src/render/pipelines.cpp b/src/render/pipelines.cpp index 9607152..bfe25a8 100644 --- a/src/render/pipelines.cpp +++ b/src/render/pipelines.cpp @@ -1,6 +1,6 @@ #include "pipelines.h" #include -#include +#include bool vkutil::load_shader_module(const char *filePath, VkDevice device, VkShaderModule *outShaderModule) { diff --git a/src/render/pipelines.h b/src/render/pipelines.h index 74d0c67..bb6ec5b 100644 --- a/src/render/pipelines.h +++ b/src/render/pipelines.h @@ -1,8 +1,8 @@ #pragma once -#include +#include #include -#include +#include namespace vkutil { diff --git a/src/render/primitives.h b/src/render/primitives.h index 14359f6..0b36f4a 100644 --- a/src/render/primitives.h +++ b/src/render/primitives.h @@ -4,7 +4,7 @@ #include #include #include -#include "core/vk_types.h" +#include "core/types.h" #include "glm/gtx/compatibility.hpp" #include "glm/gtx/norm.hpp" diff --git a/src/render/renderpass.h b/src/render/renderpass.h index b79377f..4cff8ab 100644 --- a/src/render/renderpass.h +++ b/src/render/renderpass.h @@ -1,5 +1,5 @@ #pragma once -#include +#include #include #include #include diff --git a/src/scene/camera.h b/src/scene/camera.h index ac70c03..a102572 100644 --- a/src/scene/camera.h +++ b/src/scene/camera.h @@ -1,6 +1,6 @@ #pragma once -#include +#include #include #include "glm/vec3.hpp" diff --git a/src/scene/mesh_bvh.h b/src/scene/mesh_bvh.h index eb5c12a..ef5ef6d 100644 --- a/src/scene/mesh_bvh.h +++ b/src/scene/mesh_bvh.h @@ -8,7 +8,7 @@ #include #include -#include +#include #include struct MeshAsset; diff --git a/src/scene/tangent_space.h b/src/scene/tangent_space.h index aebb9a5..7942f27 100644 --- a/src/scene/tangent_space.h +++ b/src/scene/tangent_space.h @@ -2,7 +2,7 @@ #include #include -#include +#include namespace geom { diff --git a/src/scene/vk_loader.cpp b/src/scene/vk_loader.cpp index 38a6536..09ded33 100644 --- a/src/scene/vk_loader.cpp +++ b/src/scene/vk_loader.cpp @@ -3,12 +3,12 @@ #include #include #include "vk_loader.h" -#include "core/texture_cache.h" +#include "core/assets/texture_cache.h" -#include "core/vk_engine.h" +#include "core/engine.h" #include "render/materials.h" -#include "core/vk_initializers.h" -#include "core/vk_types.h" +#include "core/util/initializers.h" +#include "core/types.h" #include "core/config.h" #include diff --git a/src/scene/vk_loader.h b/src/scene/vk_loader.h index 9091731..e8dc1a6 100644 --- a/src/scene/vk_loader.h +++ b/src/scene/vk_loader.h @@ -3,9 +3,9 @@ #pragma once -#include +#include -#include "core/vk_descriptors.h" +#include "core/descriptor/descriptors.h" #include #include diff --git a/src/scene/vk_scene.cpp b/src/scene/vk_scene.cpp index 5b48099..6a65041 100644 --- a/src/scene/vk_scene.cpp +++ b/src/scene/vk_scene.cpp @@ -4,8 +4,8 @@ #include #include -#include "vk_swapchain.h" -#include "core/engine_context.h" +#include "core/device/swapchain.h" +#include "core/context.h" #include "core/config.h" #include "glm/gtx/transform.hpp" #include @@ -15,7 +15,7 @@ #include #include -#include "frame_resources.h" +#include "core/frame/resources.h" #include "core/config.h" #include diff --git a/src/scene/vk_scene.h b/src/scene/vk_scene.h index fcf245b..90980d1 100644 --- a/src/scene/vk_scene.h +++ b/src/scene/vk_scene.h @@ -1,5 +1,5 @@ #pragma once -#include +#include #include #include #include diff --git a/src/scene/vk_scene_picking.cpp b/src/scene/vk_scene_picking.cpp index 0c392b2..8949281 100644 --- a/src/scene/vk_scene_picking.cpp +++ b/src/scene/vk_scene_picking.cpp @@ -1,7 +1,7 @@ #include "vk_scene.h" -#include "vk_swapchain.h" -#include "core/engine_context.h" +#include "core/device/swapchain.h" +#include "core/context.h" #include "mesh_bvh.h" #include "glm/gtx/transform.hpp"