[WIP] Refactor project

There are many problems with the way the current version is provided
and maintained. This commit or series of commits will fix this.
This commit is contained in:
Piotr Krygier committed 2025-06-20 13:44:33 +02:00
1 parent f5ab5f3f27
commit 173a82b9d1
63 files changed
+2663 -2239

No files matched your search

+12 -14
View File
@@ -9,44 +9,42 @@
*
*/
#ifndef RSE_WINDOW_H
#define RSE_WINDOW_H
#ifndef WINDOW_H
#define WINDOW_H
#include <stdint.h>
#include <vulkan/vulkan.h>
/* Vulkan header MUST be included before glfw */
#include <GLFW/glfw3.h>
#include "utilities/rse_commons.h"
#include "utilities/commons.h"
#include "graphics_context.h"
/**
* @brief Initialize window
*
* @param window_handle Pointer to window window_handle, that will be initialized
* @param is_framebuffer_resized Pointer to boolean, that will be set to true if framebuffer was resized
* @return rse_err_t WINDOW_SUCCESS on success. Possible errors:
* WINDOW_VULKAN_NOT_LOADED
* WINDOW_WINDOW_NOT_CREATED
*
*/
rse_err_t window_init();
rse_err_t window_init(GLFWwindow* window_handle, bool* is_framebuffer_resized);
/**
* @brief Main window loop
*
* @param vulkan_state
* @param context Graphics context
* @return rse_err_t WINDOW_SUCCESS or error code
*/
rse_err_t window_loop();
rse_err_t window_loop(struct graphics_context_t* context);
/**
* @brief Closes window and terminates GLFW
*
* @param window_handle Pointer to window window_handle
*/
void window_terminate();
void window_terminate(GLFWwindow* window_handle);
GLFWwindow* get_window_handle();
uint8_t is_framebuffer_resized(void);
void reset_framebuffer_resized(void);
#endif /* RSE_WINDOW_H */
#endif /* WINDOW_H */