Fix time and subprojects
Moved SDL3 to subprojects. Fixed time calculation. Signed-off-by: Piotr Krygier <piotrkrygier@everyonecancode.xyz>
This commit is contained in:
1 parent
ca1477b500
commit
eff8c43224
6 files changed
+42
-12
No files matched your search
@@ -17,7 +17,7 @@ rse_graphics_sources = [
|
||||
|
||||
vulkan_dep = dependency('Vulkan')
|
||||
|
||||
sdl3_dep = dependency('sdl3', version: '>=3.4.0')
|
||||
sdl3_dep = dependency('sdl3', version: '>=3.4.0', default_options : ['warning_level=0', 'werror=false'])
|
||||
|
||||
freetype_dep = dependency('freetype2', version: '>=22.1.16')
|
||||
glm_dep = dependency('cglm', version: '>=0.9.6', method: 'cmake')
|
||||
@@ -30,6 +30,10 @@ stb = dependency('stb',
|
||||
rse_graphics_lib = shared_library(
|
||||
'rse_graphics',
|
||||
rse_graphics_sources,
|
||||
override_options: [
|
||||
'warning_level=3',
|
||||
'werror=true'
|
||||
],
|
||||
include_directories: ['../'],
|
||||
dependencies: [
|
||||
vulkan_dep,
|
||||
@@ -51,4 +55,4 @@ rse_graphics_lib_dep = declare_dependency(
|
||||
glm_dep
|
||||
],
|
||||
include_directories: include_directories('.')
|
||||
)
|
||||
)
|
||||
@@ -1,8 +1,17 @@
|
||||
#include "rse_graphics.h"
|
||||
|
||||
#ifdef __unix__
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wunused-parameter"
|
||||
#pragma GCC diagnostic ignored "-Wsign-compare"
|
||||
#endif
|
||||
#include <SDL3/SDL_init.h>
|
||||
#include <SDL3/SDL_error.h>
|
||||
#include <SDL3/SDL_log.h>
|
||||
#include <SDL3/SDL_render.h>
|
||||
#ifdef __unix__
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
#include <cglm/util.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
@@ -110,6 +119,8 @@ rse_err_t rse_graphics_init(struct graphics_context_t* context)
|
||||
{
|
||||
rse_err_t status = RSE_ERROR_NO_ERROR;
|
||||
|
||||
SDL_Init(SDL_INIT_VIDEO);
|
||||
|
||||
STATUS_CHECK(window_init(&context->window_handle, &context->is_framebuffer_resized));
|
||||
STATUS_CHECK(vulkan_init(context));
|
||||
|
||||
|
||||
@@ -225,7 +225,9 @@ static rse_err_t create_instance(VkInstance* instance)
|
||||
}
|
||||
|
||||
/* Check if selected extensions are supported*/
|
||||
SDL_LogDebug(SDL_LOG_CATEGORY_GPU, "Enabled extensions names:");
|
||||
for (i = 0; i < enabled_instance_extensions_count; ++i) {
|
||||
SDL_LogDebug(SDL_LOG_CATEGORY_GPU, "\t-%s", enabled_instance_extensions_names[i]);
|
||||
for (j = 0; j < extensionCount; ++j) {
|
||||
if (strcmp(extensions_properties[j].extensionName, enabled_instance_extensions_names[i]) == 0) {
|
||||
supported = 1;
|
||||
|
||||
Reference in new issue
Block a user