#pragma once #include #include #include #include #define GLFW_INCLUDE_VULKAN #include #include #include /** * Contains information about the current render state, can be used for querying * how the renderer is currently set up. */ typedef struct { /** The GLFW Window Context Pointer */ GLFWwindow *window; /** Resolution (in pixels) */ int32_t width, height; } render_t; /** Current active renderer. */ extern render_t *RENDER_CURRENT; /** * Initialize the renderer. * * @param width Width (in pixels) of the window. * @param height Height (in pixels) of the window. * @param name String of the windows' name. * @return Rendering Context information. */ render_t * renderInit(int32_t width, int32_t height, char *name); /** * Render a single frame of the render loop. The renderer is not (currently) * responsible for render looping. * * @param render The renderer to loop for. */ void renderFrame(render_t *render); /** * Cleanup a render context. * * @param render Renderer to cleanup. * @return True or False if Successful/Not. */ bool renderDispose(render_t *render); /** * Resize callbacks. * * @param window Window that was resized. * @param width New window width. * @param height New window height. */ void renderOnResize(GLFWwindow *window, int32_t width, int32_t height);