diff options
Diffstat (limited to 'gfx-iso')
-rw-r--r-- | gfx-iso/src/app.c | 36 |
1 files changed, 18 insertions, 18 deletions
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 @@ | |||
2 | #include <isogfx/isogfx.h> | 2 | #include <isogfx/isogfx.h> |
3 | 3 | ||
4 | #include <gfx/app.h> | 4 | #include <gfx/app.h> |
5 | #include <gfx/core.h> | ||
5 | #include <gfx/gfx.h> | 6 | #include <gfx/gfx.h> |
6 | #include <gfx/render_backend.h> | ||
7 | #include <gfx/renderer.h> | 7 | #include <gfx/renderer.h> |
8 | #include <gfx/scene.h> | 8 | #include <gfx/scene.h> |
9 | #include <gfx/util/geometry.h> | 9 | #include <gfx/util/geometry.h> |
@@ -58,26 +58,26 @@ static bool init(GfxAppState* gfx_app_state, int argc, const char** argv) { | |||
58 | if (!(state->gfx = gfx_init())) { | 58 | if (!(state->gfx = gfx_init())) { |
59 | goto cleanup; | 59 | goto cleanup; |
60 | } | 60 | } |
61 | RenderBackend* render_backend = gfx_get_render_backend(state->gfx); | 61 | GfxCore* gfxcore = gfx_get_core(state->gfx); |
62 | 62 | ||
63 | if (!(state->screen_texture = gfx_make_texture( | 63 | if (!(state->screen_texture = gfx_make_texture( |
64 | render_backend, &(TextureDesc){ | 64 | gfxcore, &(TextureDesc){ |
65 | .width = texture_width, | 65 | .width = texture_width, |
66 | .height = texture_height, | 66 | .height = texture_height, |
67 | .dimension = Texture2D, | 67 | .dimension = Texture2D, |
68 | .format = TextureSRGBA8, | 68 | .format = TextureSRGBA8, |
69 | .filtering = NearestFiltering, | 69 | .filtering = NearestFiltering, |
70 | .wrap = ClampToEdge, | 70 | .wrap = ClampToEdge, |
71 | .mipmaps = false}))) { | 71 | .mipmaps = false}))) { |
72 | goto cleanup; | 72 | goto cleanup; |
73 | } | 73 | } |
74 | 74 | ||
75 | ShaderProgram* shader = gfx_make_view_texture_shader(render_backend); | 75 | ShaderProgram* shader = gfx_make_view_texture_shader(gfxcore); |
76 | if (!shader) { | 76 | if (!shader) { |
77 | goto cleanup; | 77 | goto cleanup; |
78 | } | 78 | } |
79 | 79 | ||
80 | Geometry* geometry = gfx_make_quad_11(render_backend); | 80 | Geometry* geometry = gfx_make_quad_11(gfxcore); |
81 | if (!geometry) { | 81 | if (!geometry) { |
82 | goto cleanup; | 82 | goto cleanup; |
83 | } | 83 | } |
@@ -155,22 +155,22 @@ static void render(GfxAppState* gfx_app_state) { | |||
155 | gfx_update_texture( | 155 | gfx_update_texture( |
156 | state->screen_texture, &(TextureDataDesc){.pixels = screen}); | 156 | state->screen_texture, &(TextureDataDesc){.pixels = screen}); |
157 | 157 | ||
158 | RenderBackend* render_backend = gfx_get_render_backend(state->gfx); | 158 | GfxCore* gfxcore = gfx_get_core(state->gfx); |
159 | Renderer* renderer = gfx_get_renderer(state->gfx); | 159 | Renderer* renderer = gfx_get_renderer(state->gfx); |
160 | 160 | ||
161 | gfx_start_frame(render_backend); | 161 | gfx_start_frame(gfxcore); |
162 | gfx_render_scene( | 162 | gfx_render_scene( |
163 | renderer, &(RenderSceneParams){ | 163 | renderer, &(RenderSceneParams){ |
164 | .mode = RenderDefault, .scene = state->scene, .camera = 0}); | 164 | .mode = RenderDefault, .scene = state->scene, .camera = 0}); |
165 | gfx_end_frame(render_backend); | 165 | gfx_end_frame(gfxcore); |
166 | } | 166 | } |
167 | 167 | ||
168 | static void resize(GfxAppState* gfx_app_state, int width, int height) { | 168 | static void resize(GfxAppState* gfx_app_state, int width, int height) { |
169 | assert(gfx_app_state); | 169 | assert(gfx_app_state); |
170 | AppState* state = &gfx_app_state->state; | 170 | AppState* state = &gfx_app_state->state; |
171 | 171 | ||
172 | RenderBackend* render_backend = gfx_get_render_backend(state->gfx); | 172 | GfxCore* gfxcore = gfx_get_core(state->gfx); |
173 | gfx_set_viewport(render_backend, width, height); | 173 | gfx_set_viewport(gfxcore, width, height); |
174 | } | 174 | } |
175 | 175 | ||
176 | void iso_run(int argc, const char** argv, IsoGfxApp* app) { | 176 | void iso_run(int argc, const char** argv, IsoGfxApp* app) { |