Add subprojects

Instead of relying on host system, some dependencies had been added using meson wrap DB and custom meson wrappers.

Signed-off-by: Piotr Krygier <piotrkrygier@everyonecancode@xyz>
This commit is contained in:
Piotr Krygier
2026-06-08 20:26:37 +02:00
parent ceb9e365de
commit ca1477b500
20 changed files with 193 additions and 101 deletions
+4 -2
View File
@@ -52,5 +52,7 @@ CMakeFiles/
.clangd/ .clangd/
compile_commands.json compile_commands.json
# Environment preparation scripts # Ignore subproject path except config files
setup-env.sh subprojects/*
!subprojects/packagefiles/
!subprojects/*.wrap
+24 -18
View File
@@ -15,34 +15,40 @@ rse_graphics_sources = [
'src/window.c', 'src/window.c',
] ]
vulkan_dep = dependency('vulkan', vulkan_dep = dependency('Vulkan')
version : '>=1.4.335')
sdl3_dep = dependency('sdl3', sdl3_dep = dependency('sdl3', version: '>=3.4.0')
version : '>=3.4.0')
freetype_dep = dependency('freetype2', freetype_dep = dependency('freetype2', version: '>=22.1.16')
version : '>=22.1.16') glm_dep = dependency('cglm', version: '>=0.9.6', method: 'cmake')
glm_dep = dependency('glm',
version : '>=1.0.3', vma_dep = dependency('VulkanMemoryAllocator', version: '>=3.3.0')
method : 'cmake')
vma_dep = dependency('VulkanMemoryAllocator', stb = dependency('stb',
version : '>=3.3.0', fallback: ['stb', 'stb_dep'])
modules : ['GPUOpen::VulkanMemoryAllocator'])
rse_graphics_lib = shared_library( rse_graphics_lib = shared_library(
'rse_graphics', 'rse_graphics',
rse_graphics_sources, rse_graphics_sources,
include_directories : [ include_directories: ['../'],
'../' dependencies: [
], vulkan_dep,
dependencies : [vulkan_dep,
vma_dep, vma_dep,
sdl3_dep, sdl3_dep,
freetype_dep, freetype_dep,
glm_dep, glm_dep,
stb_dep, stb
], ],
link_with: rse_utilities_lib, link_with: rse_utilities_lib,
install : true install: true,
)
rse_graphics_lib_dep = declare_dependency(
link_with: rse_graphics_lib,
dependencies: [
vulkan_dep,
vma_dep,
glm_dep
],
include_directories: include_directories('.')
) )
+1 -1
View File
@@ -21,7 +21,7 @@
#include "utilities/entity.h" #include "utilities/entity.h"
#include "utilities/vector.h" #include "utilities/vector.h"
#include "vma/vk_mem_alloc.h" #include "vk_mem_alloc.h"
#include "vulkan/vulkan_core.h" #include "vulkan/vulkan_core.h"
#include "vulkan_commons.h" #include "vulkan_commons.h"
+1 -1
View File
@@ -23,7 +23,7 @@
#pragma GCC diagnostic ignored "-Wswitch" #pragma GCC diagnostic ignored "-Wswitch"
#pragma GCC diagnostic ignored "-Wparentheses" #pragma GCC diagnostic ignored "-Wparentheses"
#endif #endif
#include "vma/vk_mem_alloc.h" #include "vk_mem_alloc.h"
#ifdef __unix__ #ifdef __unix__
#pragma GCC diagnostic pop #pragma GCC diagnostic pop
#endif #endif
+72 -37
View File
@@ -15,25 +15,23 @@
#include <SDL3/SDL_log.h> #include <SDL3/SDL_log.h>
#include <SDL3/SDL_main.h> #include <SDL3/SDL_main.h>
#include <SDL3/SDL_vulkan.h> #include <SDL3/SDL_vulkan.h>
#include <vma/vk_mem_alloc.h> #include <stddef.h>
#include <stdlib.h>
#include <string.h>
#include <vk_mem_alloc.h>
#include "pipeline_builder.h"
#include "src/descriptor_builder.h" #include "src/descriptor_builder.h"
#include "src/graphics_context.h" #include "src/graphics_context.h"
#include "utilities/commons.h" #include "utilities/commons.h"
#include "utilities/errors_common.h" #include "utilities/errors_common.h"
#include "vulkan/vulkan_core.h" #include "vulkan/vulkan_core.h"
#include "vulkan_commons.h"
#include "vulkan_commands.h"
#include "vulkan_buffers.h" #include "vulkan_buffers.h"
#include "vulkan_commands.h"
#include "vulkan_commons.h"
#include "vulkan_image.h" #include "vulkan_image.h"
#include "vulkan_render_pass.h" #include "vulkan_render_pass.h"
#include "vulkan_swapchain.h" #include "vulkan_swapchain.h"
#include "pipeline_builder.h"
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#define APPLICATION_NAME "RedScarfEngine PoC" #define APPLICATION_NAME "RedScarfEngine PoC"
#define ENGINE_NAME "RedScarf Engine" #define ENGINE_NAME "RedScarf Engine"
@@ -49,7 +47,8 @@
*/ */
static VKAPI_ATTR VkBool32 VKAPI_CALL debug_callback(VkDebugUtilsMessageSeverityFlagBitsEXT message_severity, static VKAPI_ATTR VkBool32 VKAPI_CALL debug_callback(VkDebugUtilsMessageSeverityFlagBitsEXT message_severity,
VkDebugUtilsMessageTypeFlagsEXT message_type, VkDebugUtilsMessageTypeFlagsEXT message_type,
const VkDebugUtilsMessengerCallbackDataEXT* callback_data, void* user_data) const VkDebugUtilsMessengerCallbackDataEXT* callback_data,
void* user_data)
{ {
(void)message_severity; (void)message_severity;
(void)message_type; (void)message_type;
@@ -80,7 +79,8 @@ static VKAPI_ATTR VkBool32 VKAPI_CALL debug_callback(VkDebugUtilsMessageSeverity
* @param debug_messenger Debug messanger handle * @param debug_messenger Debug messanger handle
* @return VkResult VK_SUCCESS on success * @return VkResult VK_SUCCESS on success
*/ */
static VkResult CreateDebugUtilsMessengerEXT(VkInstance instance, const VkDebugUtilsMessengerCreateInfoEXT* create_info, static VkResult CreateDebugUtilsMessengerEXT(VkInstance instance,
const VkDebugUtilsMessengerCreateInfoEXT* create_info,
const VkAllocationCallbacks* allocator, const VkAllocationCallbacks* allocator,
VkDebugUtilsMessengerEXT* debug_messenger) VkDebugUtilsMessengerEXT* debug_messenger)
{ {
@@ -108,10 +108,9 @@ static rse_err_t setup_debug_messenger(VkInstance instance, VkDebugUtilsMessenge
create_info.sType = VK_STRUCTURE_TYPE_DEBUG_UTILS_MESSENGER_CREATE_INFO_EXT; create_info.sType = VK_STRUCTURE_TYPE_DEBUG_UTILS_MESSENGER_CREATE_INFO_EXT;
create_info.pNext = NULL; create_info.pNext = NULL;
create_info.messageSeverity = VK_DEBUG_UTILS_MESSAGE_SEVERITY_VERBOSE_BIT_EXT | create_info.messageSeverity =
VK_DEBUG_UTILS_MESSAGE_SEVERITY_INFO_BIT_EXT | VK_DEBUG_UTILS_MESSAGE_SEVERITY_VERBOSE_BIT_EXT | VK_DEBUG_UTILS_MESSAGE_SEVERITY_INFO_BIT_EXT |
VK_DEBUG_UTILS_MESSAGE_SEVERITY_WARNING_BIT_EXT | VK_DEBUG_UTILS_MESSAGE_SEVERITY_WARNING_BIT_EXT | VK_DEBUG_UTILS_MESSAGE_SEVERITY_ERROR_BIT_EXT;
VK_DEBUG_UTILS_MESSAGE_SEVERITY_ERROR_BIT_EXT;
create_info.messageType = VK_DEBUG_UTILS_MESSAGE_TYPE_GENERAL_BIT_EXT | create_info.messageType = VK_DEBUG_UTILS_MESSAGE_TYPE_GENERAL_BIT_EXT |
VK_DEBUG_UTILS_MESSAGE_TYPE_VALIDATION_BIT_EXT | VK_DEBUG_UTILS_MESSAGE_TYPE_VALIDATION_BIT_EXT |
VK_DEBUG_UTILS_MESSAGE_TYPE_PERFORMANCE_BIT_EXT; VK_DEBUG_UTILS_MESSAGE_TYPE_PERFORMANCE_BIT_EXT;
@@ -134,7 +133,8 @@ static rse_err_t setup_debug_messenger(VkInstance instance, VkDebugUtilsMessenge
* @param debug_messenger Debug messanger handle * @param debug_messenger Debug messanger handle
* @param allocator Memory allocator * @param allocator Memory allocator
*/ */
static void DestroyDebugUtilsMessengerEXT(VkInstance instance, VkDebugUtilsMessengerEXT debug_messenger, static void DestroyDebugUtilsMessengerEXT(VkInstance instance,
VkDebugUtilsMessengerEXT debug_messenger,
const VkAllocationCallbacks* allocator) const VkAllocationCallbacks* allocator)
{ {
PFN_vkDestroyDebugUtilsMessengerEXT func = PFN_vkDestroyDebugUtilsMessengerEXT func =
@@ -233,7 +233,9 @@ static rse_err_t create_instance(VkInstance* instance)
} }
} }
if (supported == 0) { if (supported == 0) {
SDL_LogCritical(SDL_LOG_CATEGORY_GPU, "Selected extension is not supported: %s", extensions_properties[j].extensionName); SDL_LogCritical(SDL_LOG_CATEGORY_GPU,
"Selected extension is not supported: %s",
extensions_properties[j].extensionName);
return RSE_ERROR_INTERNAL_ERROR; return RSE_ERROR_INTERNAL_ERROR;
} }
supported = 0; supported = 0;
@@ -293,7 +295,8 @@ static rse_err_t pick_physical_device(VkInstance instance, VkPhysicalDevice* phy
{ {
uint32_t physical_device_count = 0U; uint32_t physical_device_count = 0U;
VkPhysicalDevice* physical_devices = NULL; VkPhysicalDevice* physical_devices = NULL;
VkPhysicalDeviceProperties device_properties = {0};; VkPhysicalDeviceProperties device_properties = {0};
;
VkPhysicalDeviceFeatures device_features = {0}; VkPhysicalDeviceFeatures device_features = {0};
/* Get number of existing physical devices */ /* Get number of existing physical devices */
@@ -378,9 +381,12 @@ static rse_err_t create_device(struct graphics_context_t* context)
} }
/* Get information about supported queue families */ /* Get information about supported queue families */
vkGetPhysicalDeviceQueueFamilyProperties(context->vulkan_handles.physical_device, &queue_families_property_count, NULL); vkGetPhysicalDeviceQueueFamilyProperties(context->vulkan_handles.physical_device,
&queue_families_property_count,
NULL);
rse_malloc(queue_family_properties, sizeof(VkQueueFamilyProperties) * queue_families_property_count); rse_malloc(queue_family_properties, sizeof(VkQueueFamilyProperties) * queue_families_property_count);
vkGetPhysicalDeviceQueueFamilyProperties(context->vulkan_handles.physical_device, &queue_families_property_count, vkGetPhysicalDeviceQueueFamilyProperties(context->vulkan_handles.physical_device,
&queue_families_property_count,
queue_family_properties); queue_family_properties);
/* Get queue families that support graphics operations AND have most /* Get queue families that support graphics operations AND have most
@@ -401,7 +407,10 @@ static rse_err_t create_device(struct graphics_context_t* context)
/* Check for family with surface support */ /* Check for family with surface support */
VkBool32 presentSupport = VK_FALSE; VkBool32 presentSupport = VK_FALSE;
vkGetPhysicalDeviceSurfaceSupportKHR(context->vulkan_handles.physical_device, familyIdx, context->vulkan_handles.surface, &presentSupport); vkGetPhysicalDeviceSurfaceSupportKHR(context->vulkan_handles.physical_device,
familyIdx,
context->vulkan_handles.surface,
&presentSupport);
if (presentSupport) { if (presentSupport) {
presentation_familiy_idx = familyIdx; presentation_familiy_idx = familyIdx;
presentation_familiy_found = true; presentation_familiy_found = true;
@@ -426,16 +435,17 @@ static rse_err_t create_device(struct graphics_context_t* context)
context->queue_family_indices[QUEUE_FAMILY_INDEX_GRAPHICS] = graphics_family_idx; context->queue_family_indices[QUEUE_FAMILY_INDEX_GRAPHICS] = graphics_family_idx;
context->queue_family_indices[QUEUE_FAMILY_INDEX_PRESENTATION] = presentation_familiy_idx; context->queue_family_indices[QUEUE_FAMILY_INDEX_PRESENTATION] = presentation_familiy_idx;
rse_malloc(graphics_familiy_queue_priorities, sizeof(float) * queue_family_properties[graphics_family_idx].queueCount); rse_malloc(graphics_familiy_queue_priorities,
sizeof(float) * queue_family_properties[graphics_family_idx].queueCount);
for (size_t i = 0; i < queue_family_properties[graphics_family_idx].queueCount; i++) { for (size_t i = 0; i < queue_family_properties[graphics_family_idx].queueCount; i++) {
graphics_familiy_queue_priorities[i] = 1.0f; graphics_familiy_queue_priorities[i] = 1.0f;
} }
rse_malloc(presentation_familiy_queue_priorities, sizeof(float) * queue_family_properties[presentation_familiy_idx].queueCount); rse_malloc(presentation_familiy_queue_priorities,
sizeof(float) * queue_family_properties[presentation_familiy_idx].queueCount);
for (size_t i = 0; i < queue_family_properties[presentation_familiy_idx].queueCount; i++) { for (size_t i = 0; i < queue_family_properties[presentation_familiy_idx].queueCount; i++) {
presentation_familiy_queue_priorities[i] = presentation_familiy_queue_priorities[i] = 1.0f;
1.0f;
} }
device_queue_createinfos[0].sType = VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO; device_queue_createinfos[0].sType = VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO;
@@ -463,13 +473,19 @@ static rse_err_t create_device(struct graphics_context_t* context)
device_create_info.ppEnabledExtensionNames = enabled_device_extensions_names; device_create_info.ppEnabledExtensionNames = enabled_device_extensions_names;
device_create_info.pEnabledFeatures = NULL; device_create_info.pEnabledFeatures = NULL;
if (VK_SUCCESS != vkCreateDevice(context->vulkan_handles.physical_device, &device_create_info, NULL, &context->vulkan_handles.device)) { if (VK_SUCCESS != vkCreateDevice(context->vulkan_handles.physical_device,
&device_create_info,
NULL,
&context->vulkan_handles.device)) {
SDL_LogCritical(SDL_LOG_CATEGORY_GPU, "Failed to create logical device"); SDL_LogCritical(SDL_LOG_CATEGORY_GPU, "Failed to create logical device");
return RSE_ERROR_INTERNAL_ERROR; return RSE_ERROR_INTERNAL_ERROR;
} }
vkGetDeviceQueue(context->vulkan_handles.device, graphics_family_idx, 0, &context->vulkan_handles.graphics_queue); vkGetDeviceQueue(context->vulkan_handles.device, graphics_family_idx, 0, &context->vulkan_handles.graphics_queue);
vkGetDeviceQueue(context->vulkan_handles.device, presentation_familiy_idx, 0, &context->vulkan_handles.present_queue); vkGetDeviceQueue(context->vulkan_handles.device,
presentation_familiy_idx,
0,
&context->vulkan_handles.present_queue);
rse_free(presentation_familiy_queue_priorities); rse_free(presentation_familiy_queue_priorities);
rse_free(graphics_familiy_queue_priorities); rse_free(graphics_familiy_queue_priorities);
@@ -505,7 +521,6 @@ static rse_err_t create_memory_allocator(struct graphics_context_t* context)
return RSE_ERROR_NO_ERROR; return RSE_ERROR_NO_ERROR;
} }
/** /**
* @brief Create a Sync Objects * @brief Create a Sync Objects
* *
@@ -522,9 +537,18 @@ static rse_err_t create_sync_objects(struct graphics_context_t* context)
fenceInfo.flags = VK_FENCE_CREATE_SIGNALED_BIT; fenceInfo.flags = VK_FENCE_CREATE_SIGNALED_BIT;
for (size_t i = 0; i < SWAP_BUFFER_COUNT; ++i) { for (size_t i = 0; i < SWAP_BUFFER_COUNT; ++i) {
if (VK_SUCCESS != vkCreateSemaphore(context->vulkan_handles.device, &semaphore_info, NULL, &context->vulkan_handles.image_available_semaphores[i]) || if (VK_SUCCESS != vkCreateSemaphore(context->vulkan_handles.device,
VK_SUCCESS != vkCreateSemaphore(context->vulkan_handles.device, &semaphore_info, NULL, &context->vulkan_handles.render_finished_semaphores[i]) || &semaphore_info,
VK_SUCCESS != vkCreateFence(context->vulkan_handles.device, &fenceInfo, NULL, &context->vulkan_handles.in_flight_fences[i])) { NULL,
&context->vulkan_handles.image_available_semaphores[i]) ||
VK_SUCCESS != vkCreateSemaphore(context->vulkan_handles.device,
&semaphore_info,
NULL,
&context->vulkan_handles.render_finished_semaphores[i]) ||
VK_SUCCESS != vkCreateFence(context->vulkan_handles.device,
&fenceInfo,
NULL,
&context->vulkan_handles.in_flight_fences[i])) {
SDL_LogCritical(SDL_LOG_CATEGORY_GPU, "Failed to create sync objects."); SDL_LogCritical(SDL_LOG_CATEGORY_GPU, "Failed to create sync objects.");
return RSE_ERROR_INTERNAL_ERROR; return RSE_ERROR_INTERNAL_ERROR;
} }
@@ -533,14 +557,14 @@ static rse_err_t create_sync_objects(struct graphics_context_t* context)
return RSE_ERROR_NO_ERROR; return RSE_ERROR_NO_ERROR;
} }
rse_err_t vulkan_init(struct graphics_context_t* context) rse_err_t vulkan_init(struct graphics_context_t* context)
{ {
rse_err_t status = RSE_ERROR_NO_ERROR; rse_err_t status = RSE_ERROR_NO_ERROR;
STATUS_CHECK(create_instance(&context->vulkan_handles.instance)); STATUS_CHECK(create_instance(&context->vulkan_handles.instance));
STATUS_CHECK(setup_debug_messenger(context->vulkan_handles.instance, &context->vulkan_handles.debug_messenger)); STATUS_CHECK(setup_debug_messenger(context->vulkan_handles.instance, &context->vulkan_handles.debug_messenger));
STATUS_CHECK(create_surface(context->vulkan_handles.instance, context->window_handle, &context->vulkan_handles.surface)); STATUS_CHECK(
create_surface(context->vulkan_handles.instance, context->window_handle, &context->vulkan_handles.surface));
STATUS_CHECK(pick_physical_device(context->vulkan_handles.instance, &context->vulkan_handles.physical_device)); STATUS_CHECK(pick_physical_device(context->vulkan_handles.instance, &context->vulkan_handles.physical_device));
STATUS_CHECK(create_device(context)); STATUS_CHECK(create_device(context));
STATUS_CHECK(create_memory_allocator(context)); STATUS_CHECK(create_memory_allocator(context));
@@ -574,12 +598,20 @@ rse_err_t vulkan_draw_frame(struct graphics_context_t* context)
VkPresentInfoKHR present_info = {0}; VkPresentInfoKHR present_info = {0};
VkSwapchainKHR swap_chains[1]; VkSwapchainKHR swap_chains[1];
vkWaitForFences(context->vulkan_handles.device, 1, &context->vulkan_handles.in_flight_fences[context->current_frame], VK_TRUE, UINT64_MAX); vkWaitForFences(context->vulkan_handles.device,
1,
&context->vulkan_handles.in_flight_fences[context->current_frame],
VK_TRUE,
UINT64_MAX);
STATUS_CHECK(buffers_update(context)); STATUS_CHECK(buffers_update(context));
result = vkAcquireNextImageKHR(context->vulkan_handles.device, context->swapchain_data.swapchain, UINT64_MAX, context->vulkan_handles.image_available_semaphores[context->current_frame], result = vkAcquireNextImageKHR(context->vulkan_handles.device,
VK_NULL_HANDLE, &image_index); context->swapchain_data.swapchain,
UINT64_MAX,
context->vulkan_handles.image_available_semaphores[context->current_frame],
VK_NULL_HANDLE,
&image_index);
if (result == VK_ERROR_OUT_OF_DATE_KHR) { if (result == VK_ERROR_OUT_OF_DATE_KHR) {
recreate_swapchain(context); recreate_swapchain(context);
@@ -612,7 +644,10 @@ rse_err_t vulkan_draw_frame(struct graphics_context_t* context)
submit_info.signalSemaphoreCount = 1; submit_info.signalSemaphoreCount = 1;
submit_info.pSignalSemaphores = signal_semaphores; submit_info.pSignalSemaphores = signal_semaphores;
if (vkQueueSubmit(context->vulkan_handles.graphics_queue, 1, &submit_info, context->vulkan_handles.in_flight_fences[context->current_frame]) != VK_SUCCESS) { if (vkQueueSubmit(context->vulkan_handles.graphics_queue,
1,
&submit_info,
context->vulkan_handles.in_flight_fences[context->current_frame]) != VK_SUCCESS) {
SDL_LogCritical(SDL_LOG_CATEGORY_GPU, "Failed to submit draw command buffer!"); SDL_LogCritical(SDL_LOG_CATEGORY_GPU, "Failed to submit draw command buffer!");
return RSE_ERROR_INTERNAL_ERROR; return RSE_ERROR_INTERNAL_ERROR;
} }
+1 -1
View File
@@ -2,7 +2,7 @@
#define VULKAN_BUFFERS_H #define VULKAN_BUFFERS_H
#include <stdint.h> #include <stdint.h>
#include <vma/vk_mem_alloc.h> #include <vk_mem_alloc.h>
#include "graphics_context.h" #include "graphics_context.h"
#include "utilities/commons.h" #include "utilities/commons.h"
+1 -1
View File
@@ -12,7 +12,7 @@
#ifndef VULKAN_COMMANDS_H #ifndef VULKAN_COMMANDS_H
#define VULKAN_COMMANDS_H #define VULKAN_COMMANDS_H
#include <vma/vk_mem_alloc.h> #include <vk_mem_alloc.h>
#include <vulkan/vulkan_core.h> #include <vulkan/vulkan_core.h>
#include "utilities/commons.h" #include "utilities/commons.h"
+1 -1
View File
@@ -14,7 +14,7 @@
#include <cglm/types.h> #include <cglm/types.h>
#include <vulkan/vulkan.h> #include <vulkan/vulkan.h>
#include <vma/vk_mem_alloc.h> #include <vk_mem_alloc.h>
#include <cglm/cglm.h> #include <cglm/cglm.h>
#include <stdalign.h> #include <stdalign.h>
+1 -1
View File
@@ -17,7 +17,7 @@
#include <string.h> #include <string.h>
#define STB_IMAGE_IMPLEMENTATION #define STB_IMAGE_IMPLEMENTATION
#include "stb/stb_image.h" #include "stb_image.h"
#define IMAGE_TAKEN 1U #define IMAGE_TAKEN 1U
#define IMAGE_FREE 0U #define IMAGE_FREE 0U
+1 -1
View File
@@ -6,7 +6,7 @@ project('RedScarfEngine',
'werror=true' 'werror=true'
]) ])
# add_project_arguments('-DWAYLAND=1', language : 'c') add_project_arguments('-DWAYLAND=1', language : 'c')
subdir('utilities') subdir('utilities')
subdir('graphics') subdir('graphics')
-10
View File
@@ -1,10 +0,0 @@
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Werror")
add_executable(${PROJECT_NAME} src/main.c)
target_include_directories(${PROJECT_NAME} PRIVATE
${CMAKE_SOURCE_DIR})
target_link_libraries(${PROJECT_NAME} PRIVATE
graphics
utilities)
+1 -1
View File
@@ -14,9 +14,9 @@ executable(
], ],
dependencies : [ dependencies : [
sdl3_dep, sdl3_dep,
rse_graphics_lib_dep,
], ],
link_with: [ link_with: [
rse_graphics_lib,
rse_events_lib, rse_events_lib,
rse_utilities_lib, rse_utilities_lib,
], ],
+10
View File
@@ -0,0 +1,10 @@
[wrap-file]
directory = cglm-0.9.6
source_url = https://github.com/recp/cglm/archive/refs/tags/v0.9.6.tar.gz
source_filename = cglm-0.9.6.tar.gz
source_hash = be5e7d384561eb0fca59724a92b7fb44bf03e588a7eae5123a7d796002928184
source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/cglm_0.9.6-1/cglm-0.9.6.tar.gz
wrapdb_version = 0.9.6-1
[provide]
cglm = cglm_dep
+7
View File
@@ -0,0 +1,7 @@
project('stb', 'c')
stb_inc = include_directories('.')
stb_dep = declare_dependency(
include_directories: stb_inc,
)
+5
View File
@@ -0,0 +1,5 @@
[wrap-git]
url = https://github.com/nothings/stb.git
revision = HEAD
depth = 1
patch_directory = stb/
+14
View File
@@ -0,0 +1,14 @@
[wrap-file]
directory = Vulkan-Headers-1.4.346
source_url = https://github.com/KhronosGroup/Vulkan-Headers/archive/v1.4.346.tar.gz
source_filename = vulkan-headers-1.4.346.tar.gz
source_hash = 5bb77f5d7b460e255a9e51affc00d64354986b55cf577d8eab28529cad01fc80
source_fallback_url = https://wrapdb.mesonbuild.com/v2/vulkan-headers_1.4.346-1/get_source/vulkan-headers-1.4.346.tar.gz
patch_filename = vulkan-headers_1.4.346-1_patch.zip
patch_url = https://wrapdb.mesonbuild.com/v2/vulkan-headers_1.4.346-1/get_patch
patch_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/vulkan-headers_1.4.346-1/vulkan-headers_1.4.346-1_patch.zip
patch_hash = b85cbf6793193b28c5bd80858308b214816e66041b10ec00f0115b19f3a7a60e
wrapdb_version = 1.4.346-1
[provide]
dependency_names = VulkanHeaders
+14
View File
@@ -0,0 +1,14 @@
[wrap-file]
directory = VulkanMemoryAllocator-3.3.0
source_url = https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator/archive/refs/tags/v3.3.0.tar.gz
source_filename = VulkanMemoryAllocator-3.3.0.tar.gz
source_hash = c4f6bbe6b5a45c2eb610ca9d231158e313086d5b1a40c9922cb42b597419b14e
source_fallback_url = https://wrapdb.mesonbuild.com/v2/vulkan-memory-allocator_3.3.0-1/get_source/VulkanMemoryAllocator-3.3.0.tar.gz
patch_filename = vulkan-memory-allocator_3.3.0-1_patch.zip
patch_url = https://wrapdb.mesonbuild.com/v2/vulkan-memory-allocator_3.3.0-1/get_patch
patch_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/vulkan-memory-allocator_3.3.0-1/vulkan-memory-allocator_3.3.0-1_patch.zip
patch_hash = 85f3c1c82f3d1938fa295c80b06fc1c5c001f939f009b566c336a941d5d2d8b5
wrapdb_version = 3.3.0-1
[provide]
dependency_names = VulkanMemoryAllocator
+9
View File
@@ -0,0 +1,9 @@
[wrap-file]
directory = Vulkan-ValidationLayers-1.2.158
source_url = https://github.com/KhronosGroup/Vulkan-ValidationLayers/archive/v1.2.158.tar.gz
source_filename = vulkan-validationlayers-1.2.158.tar.gz
source_hash = 9d7a6eba2db88b8af6457acce0b638324ca03cde2e9589ae96749114091c6e9e
patch_url = https://wrapdb.mesonbuild.com/v2/vulkan-validationlayers_1.2.158-2/get_patch
patch_filename = vulkan-validationlayers-1.2.158-2-wrap.zip
patch_hash = d38dae45ca6a7124ee8df045a8d5288390ab836b4d28c53234f90baee5c649fc
+4 -3
View File
@@ -7,8 +7,9 @@ cc = meson.get_compiler('c')
sdl3_dep = dependency('sdl3', sdl3_dep = dependency('sdl3',
version : '>=3.4.0') version : '>=3.4.0')
stb_dep = dependency('stb', stb = dependency('stb',
version : '>=2.30.0') fallback: ['stb', 'stb_dep'])
m_dep = cc.find_library('m') m_dep = cc.find_library('m')
rse_utilities_lib = shared_library( rse_utilities_lib = shared_library(
@@ -17,7 +18,7 @@ rse_utilities_lib = shared_library(
include_directories : ['.'], include_directories : ['.'],
dependencies : [ dependencies : [
sdl3_dep, sdl3_dep,
stb_dep, stb,
m_dep, m_dep,
], ],
install : true install : true
-1
View File
@@ -8,7 +8,6 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <vulkan/vulkan_core.h>
#include "SDL3/SDL_log.h" #include "SDL3/SDL_log.h"
#include "commons.h" #include "commons.h"