Add offscreen render targets and rename AssetRegistry to ResourceRegistry #8

Merged
burkkyy merged 26 commits from dev into main 2026-09-25 20:39:26 -07:00
10 changed files with 34 additions and 35 deletions
Showing only changes of commit b5d28ce3eb - Show all commits
+5
View File
@@ -17,6 +17,11 @@ target_include_directories(${ENGINE_NAME} PUBLIC
"${CMAKE_CURRENT_SOURCE_DIR}/include" "${CMAKE_CURRENT_SOURCE_DIR}/include"
) )
target_compile_definitions(${ENGINE_NAME} PUBLIC
GLM_FORCE_RADIANS
GLM_FORCE_DEPTH_ZERO_TO_ONE
)
target_link_libraries(${ENGINE_NAME} PUBLIC target_link_libraries(${ENGINE_NAME} PUBLIC
vulkan vulkan
shaderc shaderc
+1 -4
View File
@@ -7,6 +7,7 @@
#include <sophia/canvas.hpp> #include <sophia/canvas.hpp>
#include <sophia/console/console_command_registry.hpp> #include <sophia/console/console_command_registry.hpp>
#include <sophia/frame_info.hpp> #include <sophia/frame_info.hpp>
#include <sophia/math.hpp>
#include <sophia/resource_registry_ref.hpp> #include <sophia/resource_registry_ref.hpp>
#include <sophia/scene_registry.hpp> #include <sophia/scene_registry.hpp>
#include <sophia/types.hpp> #include <sophia/types.hpp>
@@ -16,10 +17,6 @@
#include <string> #include <string>
#include <vector> #include <vector>
#define GLM_FORCE_RADIANS
#define GLM_FORCE_DEPTH_ZERO_TO_ONE
#include <glm/glm.hpp>
namespace sophia { namespace sophia {
class Application { class Application {
+1 -3
View File
@@ -1,9 +1,7 @@
#pragma once #pragma once
#define GLM_FORCE_RADIANS
#define GLM_FORCE_DEPTH_ZERO_TO_ONE
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp> #include <glm/gtc/matrix_transform.hpp>
#include <sophia/math.hpp>
namespace sophia { namespace sophia {
+1 -4
View File
@@ -2,12 +2,9 @@
#include <memory> #include <memory>
#include <sophia/frame_info.hpp> #include <sophia/frame_info.hpp>
#include <sophia/math.hpp>
#include <vector> #include <vector>
#define GLM_FORCE_RADIANS
#define GLM_FORCE_DEPTH_ZERO_TO_ONE
#include <glm/glm.hpp>
namespace sophia { namespace sophia {
class Application; class Application;
+3 -6
View File
@@ -1,20 +1,17 @@
#pragma once #pragma once
#include <glm/gtc/matrix_transform.hpp>
#include <iostream> #include <iostream>
#include <ostream> #include <ostream>
#include <sophia/handles.hpp> #include <sophia/handles.hpp>
#include <sophia/math.hpp>
#include <string> #include <string>
#define GLM_FORCE_RADIANS
#define GLM_FORCE_DEPTH_ZERO_TO_ONE
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtc/quaternion.hpp>
namespace sophia { namespace sophia {
struct TagComponent { struct TagComponent {
std::string tag; // entt::hashed_string ? std::string tag; // entt::hashed_string ?
uint32_t mask = 0;
}; };
struct TransformComponent { struct TransformComponent {
+1 -4
View File
@@ -1,12 +1,9 @@
#pragma once #pragma once
#include <sophia/camera_2d.hpp> #include <sophia/camera_2d.hpp>
#include <sophia/math.hpp>
#include <sophia/types.hpp> #include <sophia/types.hpp>
#define GLM_FORCE_RADIANS
#define GLM_FORCE_DEPTH_ZERO_TO_ONE
#include <glm/glm.hpp>
namespace sophia { namespace sophia {
struct FrameInfo { struct FrameInfo {
+17
View File
@@ -0,0 +1,17 @@
#pragma once
#include <glm/glm.hpp>
#include <glm/gtc/quaternion.hpp>
namespace sophia {
using vec2 = glm::vec2;
using vec3 = glm::vec3;
using vec4 = glm::vec4;
using ivec2 = glm::ivec2;
using uvec2 = glm::uvec2;
using mat3 = glm::mat3;
using mat4 = glm::mat4;
using quat = glm::quat;
} // namespace sophia
@@ -2,16 +2,13 @@
#include <sophia/canvas.hpp> #include <sophia/canvas.hpp>
#include <sophia/handles.hpp> #include <sophia/handles.hpp>
#include <sophia/math.hpp>
#include <sophia/types.hpp> #include <sophia/types.hpp>
#include <string> #include <string>
#include <type_traits> #include <type_traits>
#include <utility> #include <utility>
#include <vector> #include <vector>
#define GLM_FORCE_RADIANS
#define GLM_FORCE_DEPTH_ZERO_TO_ONE
#include <glm/glm.hpp>
namespace sophia { namespace sophia {
class ResourceRegistry; class ResourceRegistry;
+3 -6
View File
@@ -1,6 +1,9 @@
#include <imgui.h>
#include <array> #include <array>
#include <chrono> #include <chrono>
#include <cstddef> #include <cstddef>
#include <glm/glm.hpp>
#include <sophia/application.hpp> #include <sophia/application.hpp>
#include <sophia/util/logger.hpp> #include <sophia/util/logger.hpp>
#include <string> #include <string>
@@ -8,12 +11,6 @@
#include <vector> #include <vector>
#include <vulkan/vulkan.hpp> #include <vulkan/vulkan.hpp>
#define GLM_FORCE_RADIANS
#define GLM_FORCE_DEPTH_ZERO_TO_ONE
#include <imgui.h>
#include <glm/glm.hpp>
#include "rendering/imgui_renderer.hpp" #include "rendering/imgui_renderer.hpp"
#include "rendering/model_render_system.hpp" #include "rendering/model_render_system.hpp"
#include "rendering/render_context.hpp" #include "rendering/render_context.hpp"
+1 -4
View File
@@ -2,13 +2,10 @@
#include <memory> #include <memory>
#include <sophia/handles.hpp> #include <sophia/handles.hpp>
#include <sophia/math.hpp>
#include <sophia/types.hpp> #include <sophia/types.hpp>
#include <vector> #include <vector>
#define GLM_FORCE_RADIANS
#define GLM_FORCE_DEPTH_ZERO_TO_ONE
#include <glm/glm.hpp>
#include "vulkan/buffer.hpp" #include "vulkan/buffer.hpp"
#include "vulkan/device.hpp" #include "vulkan/device.hpp"