From 48f4f9a0aaa6a3f3ef59b68eb6ae94fce8523a3e Mon Sep 17 00:00:00 2001 From: Greg Wells Date: Fri, 6 Jun 2025 20:31:34 -0400 Subject: [PATCH] begin using new version of gryphn utils --- CMakeLists.txt | 1 + rendering_api/metal/CMakeLists.txt | 2 +- .../metal/src/core/framebuffers/metal_framebuffer.h | 2 +- .../metal/src/core/framebuffers/metal_framebuffer.m | 1 + rendering_api/vulkan/CMakeLists.txt | 2 +- rendering_api/vulkan/src/debugger/vulkan_debugger.c | 1 + rendering_api/vulkan/src/instance/vulkan_instance.h | 1 + .../graphics_pipeline/vulkan_graphics_pipeline.c | 1 + src/core/debugger/gryphn_debugger.h | 4 ++-- src/core/gryphn_rendering_api.h | 2 +- src/core/instance/init/gryphn_dynamic_library.h | 2 +- src/core/output_device/gryphn_output_device.c | 1 + src/core/output_device/gryphn_physical_output_device.h | 2 +- src/core/presentation_queue/gryphn_presentation_queue.h | 8 ++++---- src/core/renderpass/gryphn_render_pass.h | 2 +- src/core/renderpass/gryphn_render_pass_descriptor.h | 2 +- src/core/shader_module/gryphn_shader_module.h | 2 +- src/core/sync/fence/gryphn_fence.h | 3 ++- src/core/window_surface/gryphn_surface.h | 2 +- src/platform/platform_macos/gryphn_platform_macos.h | 2 +- 20 files changed, 25 insertions(+), 18 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index faf6789..5db92c0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,6 +15,7 @@ add_library(Gryphn ${SOURCE_FILES} ${METAL_FILES}) target_include_directories(Gryphn PUBLIC ${CMAKE_SOURCE_DIR}/gryphn/src/) target_include_directories(Gryphn PUBLIC ${CMAKE_SOURCE_DIR}/gryphn/include/) target_include_directories(Gryphn PUBLIC ${CMAKE_SOURCE_DIR}/gryphn/src/utils) +target_include_directories(Gryphn PUBLIC ${CMAKE_SOURCE_DIR}/gryphn/src/utils/utils) add_compile_definitions(GN_REVEAL_IMPL) if(WIN32) diff --git a/rendering_api/metal/CMakeLists.txt b/rendering_api/metal/CMakeLists.txt index bdd3b8f..8aa88da 100644 --- a/rendering_api/metal/CMakeLists.txt +++ b/rendering_api/metal/CMakeLists.txt @@ -11,7 +11,7 @@ add_library(GryphnMetalImpl SHARED ${SOURCE_FILES}) target_include_directories(GryphnMetalImpl PUBLIC ${CMAKE_SOURCE_DIR}/gryphn/include/ ${CMAKE_SOURCE_DIR}/gryphn/src/ - ${CMAKE_SOURCE_DIR}/gryphn/src/ + ${CMAKE_SOURCE_DIR}/gryphn/src/utils/ src/ depends/SPIRV-Cross/ ) diff --git a/rendering_api/metal/src/core/framebuffers/metal_framebuffer.h b/rendering_api/metal/src/core/framebuffers/metal_framebuffer.h index 3368250..d4278e1 100644 --- a/rendering_api/metal/src/core/framebuffers/metal_framebuffer.h +++ b/rendering_api/metal/src/core/framebuffers/metal_framebuffer.h @@ -1,7 +1,7 @@ #pragma once #include "core/framebuffer/gryphn_framebuffer.h" #include "utils/gryphn_bool.h" -#include "utils/types/gryphn_image_format.h" +#include "utils/gryphn_image_format.h" #import #import diff --git a/rendering_api/metal/src/core/framebuffers/metal_framebuffer.m b/rendering_api/metal/src/core/framebuffers/metal_framebuffer.m index 820e248..711eb67 100644 --- a/rendering_api/metal/src/core/framebuffers/metal_framebuffer.m +++ b/rendering_api/metal/src/core/framebuffers/metal_framebuffer.m @@ -2,6 +2,7 @@ #include "core/debugger/gryphn_debugger.h" #include "core/texture/metal_texture.h" #include "core/renderpass/gryphn_render_pass_descriptor.h" +#include "core/instance/gryphn_instance.h" gnBool isDepthFormat(gnImageFormat format) { return gnFalse; diff --git a/rendering_api/vulkan/CMakeLists.txt b/rendering_api/vulkan/CMakeLists.txt index 128677a..9fee810 100644 --- a/rendering_api/vulkan/CMakeLists.txt +++ b/rendering_api/vulkan/CMakeLists.txt @@ -17,7 +17,7 @@ add_library(GryphnVulkanImpl SHARED ${SOURCE_FILES} ${METAL_FILES}) target_include_directories(GryphnVulkanImpl PUBLIC ${CMAKE_SOURCE_DIR}/gryphn/include/ ${CMAKE_SOURCE_DIR}/gryphn/src/ - ${CMAKE_SOURCE_DIR}/gryphn/src/ + ${CMAKE_SOURCE_DIR}/gryphn/src/utils/ src/ /Applications/vulkansdk/macOS/include/ ) diff --git a/rendering_api/vulkan/src/debugger/vulkan_debugger.c b/rendering_api/vulkan/src/debugger/vulkan_debugger.c index f0d2bdf..a1b277e 100644 --- a/rendering_api/vulkan/src/debugger/vulkan_debugger.c +++ b/rendering_api/vulkan/src/debugger/vulkan_debugger.c @@ -1,5 +1,6 @@ #include "vulkan_debugger.h" #include +#include "core/instance/gryphn_instance.h" void populateDebugMessengerCreateInfo(VkDebugUtilsMessengerCreateInfoEXT* createInfo) { createInfo->sType = VK_STRUCTURE_TYPE_DEBUG_UTILS_MESSENGER_CREATE_INFO_EXT; diff --git a/rendering_api/vulkan/src/instance/vulkan_instance.h b/rendering_api/vulkan/src/instance/vulkan_instance.h index 5632175..4ea9573 100644 --- a/rendering_api/vulkan/src/instance/vulkan_instance.h +++ b/rendering_api/vulkan/src/instance/vulkan_instance.h @@ -1,6 +1,7 @@ #pragma once #include #include "core/debugger/gryphn_debugger.h" +#include "core/instance/gryphn_instance.h" struct gnInstanceMessage { gnMessageSeverity severity; diff --git a/rendering_api/vulkan/src/pipelines/graphics_pipeline/vulkan_graphics_pipeline.c b/rendering_api/vulkan/src/pipelines/graphics_pipeline/vulkan_graphics_pipeline.c index c708c50..570a094 100644 --- a/rendering_api/vulkan/src/pipelines/graphics_pipeline/vulkan_graphics_pipeline.c +++ b/rendering_api/vulkan/src/pipelines/graphics_pipeline/vulkan_graphics_pipeline.c @@ -3,6 +3,7 @@ #include "output_device/vulkan_output_devices.h" #include "shader_module/vulkan_shader_module.h" #include "renderpass/vulkan_render_pass_descriptor.h" +#include "core/instance/gryphn_instance.h" VkDynamicState vkGryphnDynamicStateToVulkanDynamicState(enum gnDynamicState_e state) { switch (state) { diff --git a/src/core/debugger/gryphn_debugger.h b/src/core/debugger/gryphn_debugger.h index 8aaea34..7d5329b 100644 --- a/src/core/debugger/gryphn_debugger.h +++ b/src/core/debugger/gryphn_debugger.h @@ -1,7 +1,7 @@ #pragma once -#include "utils/strings/gryphn_string.h" +#include "utils/gryphn_string.h" #include "utils/gryphn_error_code.h" -#include "core/instance/gryphn_instance.h" +#include "core/gryphn_handles.h" struct gnPlatformDebugger_t; diff --git a/src/core/gryphn_rendering_api.h b/src/core/gryphn_rendering_api.h index 7c84888..9801f1e 100644 --- a/src/core/gryphn_rendering_api.h +++ b/src/core/gryphn_rendering_api.h @@ -1,5 +1,5 @@ #pragma once -#include "utils/strings/gryphn_string.h" +#include "utils/gryphn_string.h" typedef enum gnRenderingAPI_t { GN_RENDERINGAPI_NONE, // idk why im putting this diff --git a/src/core/instance/init/gryphn_dynamic_library.h b/src/core/instance/init/gryphn_dynamic_library.h index 6bde80d..6bac04e 100644 --- a/src/core/instance/init/gryphn_dynamic_library.h +++ b/src/core/instance/init/gryphn_dynamic_library.h @@ -1,5 +1,5 @@ #pragma once -#include "utils/strings/gryphn_string.h" +#include "utils/gryphn_string.h" #include "utils/gryphn_bool.h" typedef struct gnDynamicLibrary_t { diff --git a/src/core/output_device/gryphn_output_device.c b/src/core/output_device/gryphn_output_device.c index 483c50d..d3ae1f5 100644 --- a/src/core/output_device/gryphn_output_device.c +++ b/src/core/output_device/gryphn_output_device.c @@ -2,6 +2,7 @@ #include "core/instance/gryphn_instance.h" #include "core/gryphn_platform_functions.h" #include "core/instance/init/gryphn_init.h" +#include "utils/gryphn_bool.h" gnReturnCode gnCreateOutputDevice(gnOutputDeviceHandle* outputDevice, gnInstanceHandle instance, struct gnOutputDeviceInfo_t deviceInfo) { *outputDevice = malloc(sizeof(struct gnOutputDevice_t)); diff --git a/src/core/output_device/gryphn_physical_output_device.h b/src/core/output_device/gryphn_physical_output_device.h index 67ff480..23aabc8 100644 --- a/src/core/output_device/gryphn_physical_output_device.h +++ b/src/core/output_device/gryphn_physical_output_device.h @@ -1,5 +1,5 @@ #pragma once -#include "utils/strings/gryphn_string.h" +#include "utils/gryphn_string.h" #include "core/gryphn_handles.h" struct gnPlatformPhysicalDevice_t; diff --git a/src/core/presentation_queue/gryphn_presentation_queue.h b/src/core/presentation_queue/gryphn_presentation_queue.h index 275e7a2..4769b12 100644 --- a/src/core/presentation_queue/gryphn_presentation_queue.h +++ b/src/core/presentation_queue/gryphn_presentation_queue.h @@ -2,16 +2,16 @@ #include #include #include -#include +#include #include #include "core/gryphn_handles.h" typedef struct gnPresentationQueueInfo_t { uint32_t minImageCount; - struct gnUInt2_t imageSize; + gnUInt2 imageSize; gnWindowSurfaceHandle surface; - struct gnSurfaceFormat_t format; - enum gnImageSharingMode_e imageSharingMode; + gnSurfaceFormat format; + gnImageSharingMode imageSharingMode; uint32_t queueFamilyCount; uint32_t* queueFamilies; } gnPresentationQueueInfo; diff --git a/src/core/renderpass/gryphn_render_pass.h b/src/core/renderpass/gryphn_render_pass.h index ef6fd1f..d54a286 100644 --- a/src/core/renderpass/gryphn_render_pass.h +++ b/src/core/renderpass/gryphn_render_pass.h @@ -1,5 +1,5 @@ #pragma once -#include "utils/types/gryphn_color.h" +#include "utils/gryphn_color.h" #include "utils/math/gryphn_vec2.h" #include "core/gryphn_handles.h" diff --git a/src/core/renderpass/gryphn_render_pass_descriptor.h b/src/core/renderpass/gryphn_render_pass_descriptor.h index 74678a2..f9c673b 100644 --- a/src/core/renderpass/gryphn_render_pass_descriptor.h +++ b/src/core/renderpass/gryphn_render_pass_descriptor.h @@ -1,5 +1,5 @@ #pragma once -#include "utils/types/gryphn_image_format.h" +#include "utils/gryphn_image_format.h" #include "stdint.h" #include "core/output_device/gryphn_output_device.h" #include "core/gryphn_handles.h" diff --git a/src/core/shader_module/gryphn_shader_module.h b/src/core/shader_module/gryphn_shader_module.h index 070a177..1fe3495 100644 --- a/src/core/shader_module/gryphn_shader_module.h +++ b/src/core/shader_module/gryphn_shader_module.h @@ -1,6 +1,6 @@ #pragma once #include "stdint.h" -#include "utils/strings/gryphn_string.h" +#include "utils/gryphn_string.h" #include "utils/gryphn_error_code.h" #include "core/gryphn_handles.h" diff --git a/src/core/sync/fence/gryphn_fence.h b/src/core/sync/fence/gryphn_fence.h index 5e13c8a..d58a936 100644 --- a/src/core/sync/fence/gryphn_fence.h +++ b/src/core/sync/fence/gryphn_fence.h @@ -1,7 +1,8 @@ #pragma once -#include "core/gryphn_handles.h" +#include "stdint.h" #include "utils/gryphn_bool.h" #include "utils/gryphn_error_code.h" +#include "core/gryphn_handles.h" #ifdef GN_REVEAL_IMPL struct gnFence_t { diff --git a/src/core/window_surface/gryphn_surface.h b/src/core/window_surface/gryphn_surface.h index 7a2dab6..326587e 100644 --- a/src/core/window_surface/gryphn_surface.h +++ b/src/core/window_surface/gryphn_surface.h @@ -1,7 +1,7 @@ #pragma once #include #include -#include +#include #include "core/output_device/gryphn_physical_output_device.h" typedef struct gnSurfaceFormat_t { diff --git a/src/platform/platform_macos/gryphn_platform_macos.h b/src/platform/platform_macos/gryphn_platform_macos.h index 0ae8e18..ef44c38 100644 --- a/src/platform/platform_macos/gryphn_platform_macos.h +++ b/src/platform/platform_macos/gryphn_platform_macos.h @@ -1,5 +1,5 @@ #pragma once -#include +#include #include #ifdef __OBJC__