feat(layout)!: move /gl and /vk into rendering directory

as I was adding the audio module I realized it looks really ugly that
the audio-related stuff will be in its own directory and the renderer
modules will be scattered in root directory it makes way more sense this
way

Signed-off-by: Lorenzo Torres <lorenzo@sagittarius-a.org>
This commit is contained in:
h3llll 2025-11-05 20:38:35 +02:00 committed by Lorenzo Torres
parent 5a4db88436
commit 1070d03815
14 changed files with 6187 additions and 8 deletions

41
rendering/vk/platform.c Normal file
View file

@ -0,0 +1,41 @@
/* SPDX-License-Identifier:BSD-3-Clause */
#define RGFW_VULKAN
#define RGFW_IMPLEMENTATION
#include "../../rgfw.h"
#include <vulkan/vulkan.h>
#include "../../core/log.h"
#ifdef PLATFORM_MACOS
#include <vulkan/vulkan_macos.h>
#include <vulkan/vulkan_metal.h>
#endif
#include "../renderer.h"
/*
* This function is the entrypoint for the whole game. Its role is to
* initialize Vulkan, create the renderer and start the game loop.
*/
int platform_run(i32 argc, u8 * *argv)
{
(void)argc;
(void)argv;
log_info("Using Vulkan as rendering backend.\n");
RGFW_window *win = RGFW_createWindow("topaz", 0, 0, 800, 600, RGFW_windowCenter | RGFW_windowNoResize | RGFW_windowHide);
RGFW_window_show(win);
RGFW_window_setExitKey(win, RGFW_escape);
struct renderer_context *context = renderer_context_init();
while (RGFW_window_shouldClose(win) == RGFW_FALSE) {
RGFW_event event;
while (RGFW_window_checkEvent(win, &event));
}
renderer_context_deinit(context);
RGFW_window_close(win);
return 0;
}