implemented Vulkan surface creation

This commit is contained in:
Lorenzo Torres 2025-11-05 22:04:39 +01:00
parent fa2a4887df
commit b6b0c5091b
13 changed files with 128 additions and 18 deletions

View file

@ -2,17 +2,17 @@
#define RGFW_VULKAN
#define RGFW_IMPLEMENTATION
#include "../../rgfw.h"
#include <vulkan/vulkan.h>
#include "../../core/log.h"
#include "../renderer.h"
#ifdef PLATFORM_MACOS
#include <vulkan/vulkan_macos.h>
#include <vulkan/vulkan_metal.h>
void macos_set_window_layer(RGFW_window *window);
#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.
@ -27,8 +27,9 @@ int platform_run(i32 argc, u8 * *argv)
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);
macos_set_window_layer(win);
struct renderer_context *context = renderer_context_init();
struct renderer_context *context = renderer_context_init(win);
while (RGFW_window_shouldClose(win) == RGFW_FALSE) {
RGFW_event event;