1
Fork 0

Add gfx_get_current_windowing_api needed for Vulkan init

This commit is contained in:
Joshua Goins 2022-10-04 09:52:59 -04:00
parent 56f641863c
commit 8a43f0000f
2 changed files with 6 additions and 0 deletions

View file

@ -1652,6 +1652,10 @@ struct GfxRenderingAPI *gfx_get_current_rendering_api(void) {
return gfx_rapi;
}
struct GfxWindowManagerAPI *gfx_get_current_windowing_api(void) {
return gfx_wapi;
}
void gfx_start_frame(void) {
gfx_wapi->handle_events();
gfx_wapi->get_dimensions(&gfx_current_dimensions.width, &gfx_current_dimensions.height);

View file

@ -5,6 +5,7 @@
struct GfxRenderingAPI;
struct GfxWindowManagerAPI;
struct Gfx;
struct GfxDimensions {
uint32_t width, height;
@ -19,6 +20,7 @@ extern "C" {
void gfx_init(struct GfxWindowManagerAPI *wapi, struct GfxRenderingAPI *rapi, const char *game_name, bool start_in_fullscreen);
struct GfxRenderingAPI *gfx_get_current_rendering_api(void);
struct GfxWindowManagerAPI* gfx_get_current_windowing_api(void);
void gfx_start_frame(void);
void gfx_run(Gfx *commands);
void gfx_end_frame(void);