From 88ab79e436aec6ede0fca4949570f534ffb1b853 Mon Sep 17 00:00:00 2001 From: 3gg <3gg@shellblade.net> Date: Sat, 9 Mar 2024 09:29:52 -0800 Subject: Rename RenderBackend -> GfxCore. --- gfx-iso/src/app.c | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'gfx-iso/src') diff --git a/gfx-iso/src/app.c b/gfx-iso/src/app.c index 8e0a45a..e07f318 100644 --- a/gfx-iso/src/app.c +++ b/gfx-iso/src/app.c @@ -2,8 +2,8 @@ #include #include +#include #include -#include #include #include #include @@ -58,26 +58,26 @@ static bool init(GfxAppState* gfx_app_state, int argc, const char** argv) { if (!(state->gfx = gfx_init())) { goto cleanup; } - RenderBackend* render_backend = gfx_get_render_backend(state->gfx); + GfxCore* gfxcore = gfx_get_core(state->gfx); if (!(state->screen_texture = gfx_make_texture( - render_backend, &(TextureDesc){ - .width = texture_width, - .height = texture_height, - .dimension = Texture2D, - .format = TextureSRGBA8, - .filtering = NearestFiltering, - .wrap = ClampToEdge, - .mipmaps = false}))) { + gfxcore, &(TextureDesc){ + .width = texture_width, + .height = texture_height, + .dimension = Texture2D, + .format = TextureSRGBA8, + .filtering = NearestFiltering, + .wrap = ClampToEdge, + .mipmaps = false}))) { goto cleanup; } - ShaderProgram* shader = gfx_make_view_texture_shader(render_backend); + ShaderProgram* shader = gfx_make_view_texture_shader(gfxcore); if (!shader) { goto cleanup; } - Geometry* geometry = gfx_make_quad_11(render_backend); + Geometry* geometry = gfx_make_quad_11(gfxcore); if (!geometry) { goto cleanup; } @@ -155,22 +155,22 @@ static void render(GfxAppState* gfx_app_state) { gfx_update_texture( state->screen_texture, &(TextureDataDesc){.pixels = screen}); - RenderBackend* render_backend = gfx_get_render_backend(state->gfx); - Renderer* renderer = gfx_get_renderer(state->gfx); + GfxCore* gfxcore = gfx_get_core(state->gfx); + Renderer* renderer = gfx_get_renderer(state->gfx); - gfx_start_frame(render_backend); + gfx_start_frame(gfxcore); gfx_render_scene( renderer, &(RenderSceneParams){ .mode = RenderDefault, .scene = state->scene, .camera = 0}); - gfx_end_frame(render_backend); + gfx_end_frame(gfxcore); } static void resize(GfxAppState* gfx_app_state, int width, int height) { assert(gfx_app_state); AppState* state = &gfx_app_state->state; - RenderBackend* render_backend = gfx_get_render_backend(state->gfx); - gfx_set_viewport(render_backend, width, height); + GfxCore* gfxcore = gfx_get_core(state->gfx); + gfx_set_viewport(gfxcore, width, height); } void iso_run(int argc, const char** argv, IsoGfxApp* app) { -- cgit v1.2.3