Aster cleanup.
This commit is contained in:
parent
12ab256a30
commit
ad6ee9a0e5
|
|
@ -11,41 +11,43 @@ find_package(VulkanMemoryAllocator CONFIG REQUIRED)
|
|||
find_package(EASTL CONFIG REQUIRED)
|
||||
|
||||
set(HEADER_FILES
|
||||
"constants.h"
|
||||
"config.h"
|
||||
"logger.h"
|
||||
"global.h"
|
||||
"context.h"
|
||||
"window.h"
|
||||
"physical_device.h"
|
||||
"device.h"
|
||||
"swapchain.h"
|
||||
"pipeline.h"
|
||||
"queue_allocation.h"
|
||||
"buffer.h"
|
||||
"image.h"
|
||||
"surface.h"
|
||||
"size.h")
|
||||
"include/aster/core/global.h"
|
||||
"include/aster/util/logger.h"
|
||||
"include/aster/core/constants.h"
|
||||
"include/aster/core/config.h"
|
||||
"include/aster/core/context.h"
|
||||
"include/aster/core/physical_device.h"
|
||||
"include/aster/core/device.h"
|
||||
"include/aster/core/swapchain.h"
|
||||
"include/aster/core/pipeline.h"
|
||||
"include/aster/core/queue_allocation.h"
|
||||
"include/aster/core/buffer.h"
|
||||
"include/aster/core/image.h"
|
||||
"include/aster/core/surface.h"
|
||||
"include/aster/core/size.h"
|
||||
"include/aster/core/window.h"
|
||||
"include/aster/aster.h")
|
||||
|
||||
set(SOURCE_FILES
|
||||
"logger.cpp"
|
||||
"global.cpp"
|
||||
"context.cpp"
|
||||
"window.cpp"
|
||||
"physical_device.cpp"
|
||||
"device.cpp"
|
||||
"swapchain.cpp"
|
||||
"pipeline.cpp"
|
||||
"buffer.cpp"
|
||||
"image.cpp"
|
||||
"surface.cpp")
|
||||
"src/aster/core/global.cpp"
|
||||
"src/aster/util/logger.cpp"
|
||||
"src/aster/core/context.cpp"
|
||||
"src/aster/core/physical_device.cpp"
|
||||
"src/aster/core/device.cpp"
|
||||
"src/aster/core/swapchain.cpp"
|
||||
"src/aster/core/pipeline.cpp"
|
||||
"src/aster/core/buffer.cpp"
|
||||
"src/aster/core/image.cpp"
|
||||
"src/aster/core/surface.cpp"
|
||||
"src/aster/core/window.cpp")
|
||||
|
||||
add_library(aster_core STATIC ${SOURCE_FILES} ${HEADER_FILES})
|
||||
set_property(TARGET aster_core PROPERTY CXX_STANDARD 20)
|
||||
|
||||
target_precompile_headers(aster_core PUBLIC global.h)
|
||||
target_precompile_headers(aster_core PUBLIC "include/aster/aster.h")
|
||||
|
||||
target_include_directories(aster_core PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
target_include_directories(aster_core PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/include/aster")
|
||||
target_include_directories(aster_core PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include")
|
||||
|
||||
target_link_libraries(aster_core PUBLIC glm::glm-header-only)
|
||||
target_link_libraries(aster_core PRIVATE glfw)
|
||||
|
|
|
|||
|
|
@ -0,0 +1,8 @@
|
|||
// =============================================
|
||||
// Aster: aster.h
|
||||
// Copyright (c) 2020-2024 Anish Bhobe
|
||||
// =============================================
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "core/global.h"
|
||||
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
#include "config.h"
|
||||
#include "constants.h"
|
||||
#include "logger.h"
|
||||
#include "util/logger.h"
|
||||
|
||||
#include <GLFW/glfw3.h>
|
||||
#include <glm/glm.hpp>
|
||||
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include "constants.h"
|
||||
#include "core/constants.h"
|
||||
#include <debugbreak.h>
|
||||
#include <fmt/core.h>
|
||||
|
||||
|
|
@ -3,9 +3,9 @@
|
|||
// Copyright (c) 2020-2024 Anish Bhobe
|
||||
// =============================================
|
||||
|
||||
#include "buffer.h"
|
||||
#include "core/buffer.h"
|
||||
|
||||
#include "device.h"
|
||||
#include "core/device.h"
|
||||
|
||||
void
|
||||
Buffer::Destroy(const Device *device)
|
||||
|
|
@ -3,7 +3,8 @@
|
|||
// Copyright (c) 2020-2024 Anish Bhobe
|
||||
// =============================================
|
||||
|
||||
#include "context.h"
|
||||
#include "core/context.h"
|
||||
|
||||
#include <EASTL/array.h>
|
||||
#include <EASTL/fixed_vector.h>
|
||||
|
||||
|
|
@ -3,11 +3,11 @@
|
|||
// Copyright (c) 2020-2024 Anish Bhobe
|
||||
// =============================================
|
||||
|
||||
#include "device.h"
|
||||
#include "core/device.h"
|
||||
|
||||
#include "context.h"
|
||||
#include "physical_device.h"
|
||||
#include "queue_allocation.h"
|
||||
#include "core/context.h"
|
||||
#include "core/physical_device.h"
|
||||
#include "core/queue_allocation.h"
|
||||
|
||||
#include <EASTL/array.h>
|
||||
#include <EASTL/fixed_vector.h>
|
||||
|
|
@ -3,7 +3,7 @@
|
|||
// Copyright (c) 2020-2024 Anish Bhobe
|
||||
// =============================================
|
||||
|
||||
#include "global.h"
|
||||
#include "core/global.h"
|
||||
|
||||
#include <cstdarg>
|
||||
#include <cstdio>
|
||||
|
|
@ -3,9 +3,9 @@
|
|||
// Copyright (c) 2020-2024 Anish Bhobe
|
||||
// =============================================
|
||||
|
||||
#include "image.h"
|
||||
#include "core/image.h"
|
||||
|
||||
#include "device.h"
|
||||
#include "core/device.h"
|
||||
|
||||
void
|
||||
Image::Destroy(const Device *device)
|
||||
|
|
@ -3,11 +3,10 @@
|
|||
// Copyright (c) 2020-2024 Anish Bhobe
|
||||
// =============================================
|
||||
|
||||
#include "physical_device.h"
|
||||
#include "core/physical_device.h"
|
||||
|
||||
#include "context.h"
|
||||
#include "surface.h"
|
||||
#include "window.h"
|
||||
#include "core/context.h"
|
||||
#include "core/surface.h"
|
||||
|
||||
[[nodiscard]] vk::SurfaceCapabilitiesKHR
|
||||
GetSurfaceCapabilities(const vk::PhysicalDevice physicalDevice, const vk::SurfaceKHR surface)
|
||||
|
|
@ -3,9 +3,9 @@
|
|||
// Copyright (c) 2020-2024 Anish Bhobe
|
||||
// =============================================
|
||||
|
||||
#include "pipeline.h"
|
||||
#include "core/pipeline.h"
|
||||
|
||||
#include "device.h"
|
||||
#include "core/device.h"
|
||||
|
||||
Pipeline::Pipeline(const Device *device, vk::PipelineLayout layout, vk::Pipeline pipeline,
|
||||
eastl::vector<vk::DescriptorSetLayout> &&setLayouts)
|
||||
|
|
@ -3,10 +3,10 @@
|
|||
// Copyright (c) 2020-2024 Anish Bhobe
|
||||
// =============================================
|
||||
|
||||
#include "surface.h"
|
||||
#include "core/surface.h"
|
||||
|
||||
#include "context.h"
|
||||
#include "window.h"
|
||||
#include "core/context.h"
|
||||
#include "core/window.h"
|
||||
|
||||
Surface::Surface(Context *context, const Window *window, cstr name)
|
||||
: m_Context(context)
|
||||
|
|
@ -3,12 +3,11 @@
|
|||
// Copyright (c) 2020-2024 Anish Bhobe
|
||||
// ==============================================
|
||||
|
||||
#include "swapchain.h"
|
||||
#include "core/swapchain.h"
|
||||
|
||||
#include "device.h"
|
||||
#include "physical_device.h"
|
||||
#include "surface.h"
|
||||
#include "window.h"
|
||||
#include "core/device.h"
|
||||
#include "core/physical_device.h"
|
||||
#include "core/surface.h"
|
||||
|
||||
[[nodiscard]] vk::Extent2D GetExtent(Size2D size, vk::SurfaceCapabilitiesKHR *surfaceCapabilities);
|
||||
|
||||
|
|
@ -3,10 +3,10 @@
|
|||
// Copyright (c) 2020-2024 Anish Bhobe
|
||||
// =============================================
|
||||
|
||||
#include "window.h"
|
||||
#include "core/window.h"
|
||||
|
||||
#include "context.h"
|
||||
#include "logger.h"
|
||||
#include "core/context.h"
|
||||
#include "util/logger.h"
|
||||
|
||||
std::atomic_uint64_t Window::m_WindowCount = 0;
|
||||
std::atomic_bool Window::m_IsGlfwInit = false;
|
||||
|
|
@ -3,7 +3,7 @@
|
|||
// Copyright (c) 2020-2024 Anish Bhobe
|
||||
// =============================================
|
||||
|
||||
#include "logger.h"
|
||||
#include "util/logger.h"
|
||||
|
||||
Logger g_Logger = Logger();
|
||||
// ReSharper disable once CppInconsistentNaming
|
||||
|
|
@ -5,12 +5,12 @@ cmake_minimum_required(VERSION 3.13)
|
|||
find_package(imgui CONFIG REQUIRED)
|
||||
|
||||
add_library(util_helper STATIC
|
||||
helpers.h
|
||||
helpers.cpp
|
||||
frame.cpp
|
||||
frame.h
|
||||
gui.cpp
|
||||
gui.h)
|
||||
"helpers.h"
|
||||
"helpers.cpp"
|
||||
"frame.cpp"
|
||||
"frame.h"
|
||||
"gui.cpp"
|
||||
"gui.h")
|
||||
|
||||
target_link_libraries(util_helper PRIVATE aster_core)
|
||||
target_link_libraries(util_helper PRIVATE imgui::imgui)
|
||||
|
|
|
|||
|
|
@ -5,9 +5,10 @@
|
|||
|
||||
#include "frame.h"
|
||||
|
||||
#include "device.h"
|
||||
#include "aster/core/device.h"
|
||||
#include "aster/core/swapchain.h"
|
||||
|
||||
#include "helpers.h"
|
||||
#include "swapchain.h"
|
||||
|
||||
Frame::Frame(const Device *device, const u32 queueFamilyIndex, const u32 frameCount)
|
||||
: m_FrameIdx(frameCount)
|
||||
|
|
|
|||
|
|
@ -5,10 +5,10 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include "global.h"
|
||||
#include "aster/aster.h"
|
||||
#include "helpers.h"
|
||||
|
||||
#include "size.h"
|
||||
#include "aster/core/size.h"
|
||||
|
||||
#include <EASTL/fixed_vector.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -5,10 +5,10 @@
|
|||
|
||||
#include "gui.h"
|
||||
|
||||
#include "context.h"
|
||||
#include "device.h"
|
||||
#include "aster/core/context.h"
|
||||
#include "aster/core/device.h"
|
||||
#include "aster/core/window.h"
|
||||
#include "helpers.h"
|
||||
#include "window.h"
|
||||
|
||||
#include <imgui_impl_glfw.h>
|
||||
#include <imgui_impl_vulkan.h>
|
||||
|
|
@ -108,11 +108,11 @@ StartBuild()
|
|||
ImGui_ImplGlfw_NewFrame();
|
||||
NewFrame();
|
||||
|
||||
// static ImGuiDockNodeFlags dockspaceFlags = ImGuiDockNodeFlags_None | ImGuiDockNodeFlags_PassthruCentralNode;
|
||||
static ImGuiDockNodeFlags dockspaceFlags = ImGuiDockNodeFlags_None | ImGuiDockNodeFlags_PassthruCentralNode;
|
||||
|
||||
// We are using the ImGuiWindowFlags_NoDocking flag to make the parent window not dockable into,
|
||||
// because it would be confusing to have two docking targets within each others.
|
||||
ImGuiWindowFlags windowFlags = ImGuiWindowFlags_None; // ImGuiWindowFlags_NoDocking;
|
||||
ImGuiWindowFlags windowFlags = ImGuiWindowFlags_None | ImGuiWindowFlags_NoDocking;
|
||||
|
||||
const ImGuiViewport *viewport = GetMainViewport();
|
||||
SetNextWindowPos(viewport->WorkPos);
|
||||
|
|
@ -130,18 +130,18 @@ StartBuild()
|
|||
// all active windows docked into it will lose their parent and become undocked.
|
||||
// We cannot preserve the docking relationship between an active window and an inactive docking, otherwise
|
||||
// any change of dockspace/settings would lead to windows being stuck in limbo and never being visible.
|
||||
// PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2(0.0f, 0.0f));
|
||||
// Begin("DockSpace Demo", nullptr, windowFlags);
|
||||
// PopStyleVar();
|
||||
PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2(0.0f, 0.0f));
|
||||
Begin("DockSpace Demo", nullptr, windowFlags);
|
||||
PopStyleVar();
|
||||
|
||||
// PopStyleVar(2);
|
||||
PopStyleVar(2);
|
||||
|
||||
// DockSpace
|
||||
// if (GetIO().ConfigFlags & ImGuiConfigFlags_DockingEnable)
|
||||
// {
|
||||
// const ImGuiID dockspaceId = GetID("MyDockSpace");
|
||||
// DockSpace(dockspaceId, ImVec2(0.0f, 0.0f), dockspaceFlags);
|
||||
// }
|
||||
// DockSpace
|
||||
if (GetIO().ConfigFlags & ImGuiConfigFlags_DockingEnable)
|
||||
{
|
||||
const ImGuiID dockspaceId = GetID("MyDockSpace");
|
||||
DockSpace(dockspaceId, ImVec2(0.0f, 0.0f), dockspaceFlags);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include "global.h"
|
||||
#include "aster/aster.h"
|
||||
|
||||
#include <imgui.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@
|
|||
|
||||
#include "helpers.h"
|
||||
|
||||
#include "device.h"
|
||||
#include "physical_device.h"
|
||||
#include "aster/core/device.h"
|
||||
#include "aster/core/physical_device.h"
|
||||
|
||||
#include <EASTL/array.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -5,9 +5,9 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include "global.h"
|
||||
#include "aster/aster.h"
|
||||
|
||||
#include "queue_allocation.h"
|
||||
#include "aster/core/queue_allocation.h"
|
||||
|
||||
#include "EASTL/span.h"
|
||||
#include <EASTL/vector.h>
|
||||
|
|
|
|||
|
|
@ -3,16 +3,16 @@
|
|||
// Copyright (c) 2020-2024 Anish Bhobe
|
||||
// =============================================
|
||||
|
||||
#include "buffer.h"
|
||||
#include "constants.h"
|
||||
#include "context.h"
|
||||
#include "device.h"
|
||||
#include "physical_device.h"
|
||||
#include "window.h"
|
||||
#include "aster/aster.h"
|
||||
|
||||
#include "global.h"
|
||||
#include "pipeline.h"
|
||||
#include "swapchain.h"
|
||||
#include "aster/core/buffer.h"
|
||||
#include "aster/core/constants.h"
|
||||
#include "aster/core/context.h"
|
||||
#include "aster/core/device.h"
|
||||
#include "aster/core/physical_device.h"
|
||||
#include "aster/core/window.h"
|
||||
#include "aster/core/pipeline.h"
|
||||
#include "aster/core/swapchain.h"
|
||||
|
||||
#include "helpers.h"
|
||||
|
||||
|
|
@ -74,8 +74,8 @@ main(int, char **)
|
|||
{
|
||||
MIN_LOG_LEVEL(Logger::LogType::eInfo);
|
||||
|
||||
Context context = {"Triangle", VERSION};
|
||||
Window window = {"Triangle (Aster)", {640, 480}};
|
||||
Context context = {"Triangle", VERSION};
|
||||
Surface surface = {&context, &window, "Primary"};
|
||||
|
||||
PhysicalDevices physicalDevices = {&surface, &context};
|
||||
|
|
|
|||
|
|
@ -3,21 +3,22 @@
|
|||
// Copyright (c) 2020-2024 Anish Bhobe
|
||||
// =============================================
|
||||
|
||||
#include "buffer.h"
|
||||
#include "constants.h"
|
||||
#include "context.h"
|
||||
#include "device.h"
|
||||
#include "global.h"
|
||||
#include "physical_device.h"
|
||||
#include "pipeline.h"
|
||||
#include "swapchain.h"
|
||||
#include "window.h"
|
||||
#include "aster/aster.h"
|
||||
|
||||
#include "aster/core/buffer.h"
|
||||
#include "aster/core/constants.h"
|
||||
#include "aster/core/context.h"
|
||||
#include "aster/core/device.h"
|
||||
#include "aster/core/physical_device.h"
|
||||
#include "aster/core/pipeline.h"
|
||||
#include "aster/core/swapchain.h"
|
||||
#include "aster/core/window.h"
|
||||
#include "aster/core/image.h"
|
||||
|
||||
#include "helpers.h"
|
||||
|
||||
#define STB_IMAGE_IMPLEMENTATION
|
||||
#include "frame.h"
|
||||
#include "image.h"
|
||||
#include "stb_image.h"
|
||||
|
||||
#include <EASTL/array.h>
|
||||
|
|
@ -115,8 +116,8 @@ main(int, char **)
|
|||
{
|
||||
MIN_LOG_LEVEL(Logger::LogType::eInfo);
|
||||
|
||||
Context context = {"Box", VERSION};
|
||||
Window window = {"Box (Aster)", {640, 480}};
|
||||
Context context = {"Box", VERSION};
|
||||
Surface surface = {&context, &window, "Primary"};
|
||||
|
||||
PhysicalDevices physicalDevices = {&surface, &context};
|
||||
|
|
|
|||
|
|
@ -10,15 +10,15 @@
|
|||
#define STB_IMAGE_IMPLEMENTATION
|
||||
#define STB_IMAGE_WRITE_IMPLEMENTATION
|
||||
|
||||
#include "asset_loader.h"
|
||||
#include "aster/core/buffer.h"
|
||||
#include "aster/core/device.h"
|
||||
#include "aster/core/image.h"
|
||||
|
||||
#include "EASTL/fixed_vector.h"
|
||||
#include "buffer.h"
|
||||
#include "device.h"
|
||||
#include "gpu_resource_manager.h"
|
||||
#include "helpers.h"
|
||||
#include "image.h"
|
||||
#include "asset_loader.h"
|
||||
|
||||
#include <EASTL/fixed_vector.h>
|
||||
#include <EASTL/hash_map.h>
|
||||
#include <glm/gtc/type_ptr.hpp>
|
||||
|
||||
|
|
|
|||
|
|
@ -5,8 +5,9 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include "buffer.h"
|
||||
#include "global.h"
|
||||
#include "aster/aster.h"
|
||||
|
||||
#include "aster/core/buffer.h"
|
||||
|
||||
#include "gpu_resource_manager.h"
|
||||
#include "nodes.h"
|
||||
|
|
|
|||
|
|
@ -5,10 +5,11 @@
|
|||
|
||||
#include "gpu_resource_manager.h"
|
||||
|
||||
#include "buffer.h"
|
||||
#include "device.h"
|
||||
#include "helpers.h"
|
||||
#include "image.h"
|
||||
|
||||
#include "aster/core/buffer.h"
|
||||
#include "aster/core/device.h"
|
||||
#include "aster/core/image.h"
|
||||
|
||||
#include <EASTL/array.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include "global.h"
|
||||
#include "aster/aster.h"
|
||||
|
||||
#include <EASTL/deque.h>
|
||||
#include <EASTL/vector_map.h>
|
||||
|
|
|
|||
|
|
@ -5,15 +5,17 @@
|
|||
|
||||
#include "ibl_helpers.h"
|
||||
|
||||
#include "EASTL/fixed_vector.h"
|
||||
#include "EASTL/tuple.h"
|
||||
#include "aster/core/device.h"
|
||||
#include "aster/core/image.h"
|
||||
|
||||
#include "asset_loader.h"
|
||||
#include "device.h"
|
||||
#include "gpu_resource_manager.h"
|
||||
#include "helpers.h"
|
||||
#include "image.h"
|
||||
#include "pipeline_utils.h"
|
||||
|
||||
#include <EASTL/fixed_vector.h>
|
||||
#include <EASTL/tuple.h>
|
||||
|
||||
constexpr cstr EQUIRECT_TO_CUBE_SHADER_FILE = "shader/eqrect_to_cube.cs.hlsl.spv";
|
||||
constexpr cstr DIFFUSE_IRRADIANCE_SHADER_FILE = "shader/diffuse_irradiance.cs.hlsl.spv";
|
||||
constexpr cstr PREFILTER_SHADER_FILE = "shader/prefilter.cs.hlsl.spv";
|
||||
|
|
|
|||
|
|
@ -5,11 +5,9 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include "global.h"
|
||||
#include "aster/aster.h"
|
||||
#include "gpu_resource_manager.h"
|
||||
|
||||
#include <EASTL/tuple.h>
|
||||
|
||||
struct Pipeline;
|
||||
struct Texture;
|
||||
struct TextureCube;
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
#include "light_manager.h"
|
||||
|
||||
#include "buffer.h"
|
||||
#include "aster/core/buffer.h"
|
||||
#include "glm/ext/matrix_transform.hpp"
|
||||
|
||||
struct Light
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include "global.h"
|
||||
#include "aster/aster.h"
|
||||
|
||||
// TODO: Separate files so you only import handles.
|
||||
#include "gpu_resource_manager.h"
|
||||
|
|
|
|||
|
|
@ -3,16 +3,17 @@
|
|||
// Copyright (c) 2020-2024 Anish Bhobe
|
||||
// =============================================
|
||||
|
||||
#include "buffer.h"
|
||||
#include "constants.h"
|
||||
#include "context.h"
|
||||
#include "device.h"
|
||||
#include "global.h"
|
||||
#include "image.h"
|
||||
#include "physical_device.h"
|
||||
#include "pipeline.h"
|
||||
#include "swapchain.h"
|
||||
#include "window.h"
|
||||
#include "aster/aster.h"
|
||||
|
||||
#include "aster/core/buffer.h"
|
||||
#include "aster/core/constants.h"
|
||||
#include "aster/core/context.h"
|
||||
#include "aster/core/device.h"
|
||||
#include "aster/core/image.h"
|
||||
#include "aster/core/physical_device.h"
|
||||
#include "aster/core/pipeline.h"
|
||||
#include "aster/core/swapchain.h"
|
||||
#include "aster/core/window.h"
|
||||
|
||||
#include "frame.h"
|
||||
#include "helpers.h"
|
||||
|
|
@ -133,8 +134,8 @@ main(int, char **)
|
|||
{
|
||||
MIN_LOG_LEVEL(Logger::LogType::eInfo);
|
||||
|
||||
Context context = {"ModelRender", VERSION};
|
||||
Window window = {"ModelRender (Aster)", {INIT_WIDTH, INIT_HEIGHT}};
|
||||
Context context = {"ModelRender", VERSION};
|
||||
Surface surface = {&context, &window, "Primary Surface"};
|
||||
|
||||
PhysicalDevices physicalDevices = {&surface, &context};
|
||||
|
|
|
|||
|
|
@ -5,9 +5,9 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include "global.h"
|
||||
#include "aster/aster.h"
|
||||
|
||||
#include "EASTL/vector.h"
|
||||
#include <EASTL/vector.h>
|
||||
|
||||
struct Nodes
|
||||
{
|
||||
|
|
|
|||
|
|
@ -5,7 +5,9 @@
|
|||
|
||||
#include "pipeline_utils.h"
|
||||
|
||||
#include "device.h"
|
||||
#include "aster/core/device.h"
|
||||
#include "aster/core/pipeline.h"
|
||||
|
||||
#include "gpu_resource_manager.h"
|
||||
#include "helpers.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -5,12 +5,12 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include "global.h"
|
||||
#include "pipeline.h"
|
||||
#include "aster/aster.h"
|
||||
|
||||
struct GpuResourceManager;
|
||||
struct Swapchain;
|
||||
struct Device;
|
||||
struct Pipeline;
|
||||
|
||||
constexpr auto VERTEX_SHADER_FILE = "shader/model.vs.hlsl.spv";
|
||||
constexpr auto FRAGMENT_SHADER_FILE = "shader/model.ps.hlsl.spv";
|
||||
|
|
|
|||
|
|
@ -12,9 +12,9 @@
|
|||
|
||||
#include "asset_loader.h"
|
||||
|
||||
#include "buffer.h"
|
||||
#include "device.h"
|
||||
#include "image.h"
|
||||
#include "aster/core/buffer.h"
|
||||
#include "aster/core/device.h"
|
||||
#include "aster/core/image.h"
|
||||
|
||||
#include "core_components.h"
|
||||
#include "helpers.h"
|
||||
|
|
@ -870,7 +870,7 @@ AssetLoader::LoadModelToGpu(cstr path, cstr name)
|
|||
}
|
||||
else if (material->alphaMode == "MASK")
|
||||
{
|
||||
alphaBlendValue = material->alphaCutoff;
|
||||
alphaBlendValue = Cast<f32>(material->alphaCutoff);
|
||||
}
|
||||
|
||||
materials.push_back({
|
||||
|
|
|
|||
|
|
@ -5,9 +5,9 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include "global.h"
|
||||
#include "aster/aster.h"
|
||||
|
||||
#include "buffer.h"
|
||||
#include "aster/core/buffer.h"
|
||||
#include "render_resource_manager.h"
|
||||
|
||||
#include "ecs_adapter.h"
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
// Copyright (c) 2020-2024 Anish Bhobe
|
||||
// =============================================
|
||||
|
||||
#include "global.h"
|
||||
#include "aster/aster.h"
|
||||
|
||||
struct Camera
|
||||
{
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include "global.h"
|
||||
#include "aster/aster.h"
|
||||
|
||||
template <typename TComponent>
|
||||
struct CDirty
|
||||
|
|
|
|||
|
|
@ -5,15 +5,17 @@
|
|||
|
||||
#include "ibl_helpers.h"
|
||||
|
||||
#include "EASTL/fixed_vector.h"
|
||||
#include "EASTL/tuple.h"
|
||||
#include "aster/core/device.h"
|
||||
#include "aster/core/image.h"
|
||||
|
||||
#include "asset_loader.h"
|
||||
#include "device.h"
|
||||
#include "render_resource_manager.h"
|
||||
#include "helpers.h"
|
||||
#include "image.h"
|
||||
#include "pipeline_utils.h"
|
||||
|
||||
#include <EASTL/fixed_vector.h>
|
||||
#include <EASTL/tuple.h>
|
||||
|
||||
constexpr cstr EQUIRECT_TO_CUBE_SHADER_FILE = "shader/eqrect_to_cube.cs.hlsl.spv";
|
||||
constexpr cstr DIFFUSE_IRRADIANCE_SHADER_FILE = "shader/diffuse_irradiance.cs.hlsl.spv";
|
||||
constexpr cstr PREFILTER_SHADER_FILE = "shader/prefilter.cs.hlsl.spv";
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include "global.h"
|
||||
#include "aster/aster.h"
|
||||
#include "render_resource_manager.h"
|
||||
|
||||
struct Pipeline;
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
#include "light_manager.h"
|
||||
|
||||
#include "buffer.h"
|
||||
#include "aster/core/buffer.h"
|
||||
#include "ibl_helpers.h"
|
||||
#include "glm/ext/matrix_transform.hpp"
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include "global.h"
|
||||
#include "aster/aster.h"
|
||||
|
||||
// TODO: Separate files so you only import handles.
|
||||
#include "render_resource_manager.h"
|
||||
|
|
|
|||
|
|
@ -3,13 +3,16 @@
|
|||
// Copyright (c) 2020-2024 Anish Bhobe
|
||||
// =============================================
|
||||
|
||||
#include "context.h"
|
||||
#include "device.h"
|
||||
#include "aster/core/context.h"
|
||||
#include "aster/core/device.h"
|
||||
#include "aster/core/physical_device.h"
|
||||
#include "aster/core/swapchain.h"
|
||||
#include "aster/core/window.h"
|
||||
#include "aster/core/image.h"
|
||||
#include "aster/core/pipeline.h"
|
||||
|
||||
#include "helpers.h"
|
||||
#include "physical_device.h"
|
||||
#include "render_resource_manager.h"
|
||||
#include "swapchain.h"
|
||||
#include "window.h"
|
||||
|
||||
#include "asset_loader.h"
|
||||
#include "camera.h"
|
||||
|
|
@ -19,8 +22,6 @@
|
|||
#include "ecs_adapter.h"
|
||||
#include "frame.h"
|
||||
#include "ibl_helpers.h"
|
||||
#include "image.h"
|
||||
#include "pipeline.h"
|
||||
|
||||
#include "pipeline_utils.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,8 @@
|
|||
|
||||
#include "pipeline_utils.h"
|
||||
|
||||
#include "device.h"
|
||||
#include "aster/core/device.h"
|
||||
|
||||
#include "render_resource_manager.h"
|
||||
#include "helpers.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include "global.h"
|
||||
#include "pipeline.h"
|
||||
#include "aster/aster.h"
|
||||
#include "aster/core/pipeline.h"
|
||||
|
||||
struct RenderResourceManager;
|
||||
struct Swapchain;
|
||||
|
|
|
|||
|
|
@ -5,10 +5,11 @@
|
|||
|
||||
#include "render_resource_manager.h"
|
||||
|
||||
#include "buffer.h"
|
||||
#include "device.h"
|
||||
#include "aster/core/buffer.h"
|
||||
#include "aster/core/device.h"
|
||||
#include "aster/core/image.h"
|
||||
|
||||
#include "helpers.h"
|
||||
#include "image.h"
|
||||
|
||||
#include <EASTL/array.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include "global.h"
|
||||
#include "aster/aster.h"
|
||||
|
||||
#include <EASTL/deque.h>
|
||||
#include <EASTL/vector_map.h>
|
||||
|
|
|
|||
Loading…
Reference in New Issue