From f8fe3d244ff28aa55bc80a278d02b90737c85b56 Mon Sep 17 00:00:00 2001 From: 3gg <3gg@shellblade.net> Date: Sun, 29 Jun 2025 11:18:41 -0700 Subject: Update paths --- src/plugins/texture_view.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'src/plugins/texture_view.c') diff --git a/src/plugins/texture_view.c b/src/plugins/texture_view.c index a8b2a94..98ff603 100644 --- a/src/plugins/texture_view.c +++ b/src/plugins/texture_view.c @@ -13,8 +13,10 @@ #include // Default texture to load if no texture is provided. -static const char* DEFAULT_TEXTURE = "/assets/skybox/clouds1/clouds1_west.bmp"; -// static const char* DEFAULT_TEXTURE = "/assets/checkerboard.jpg"; +static const char* DEFAULT_TEXTURE = + "/home/jeanne/Nextcloud/assets/textures/skybox/clouds1/clouds1_west.bmp"; +// static const char* DEFAULT_TEXTURE = +// "/home/jeanne/Nextcloud/assets/textures/checkerboard.jpg"; struct State { Scene* scene; @@ -36,12 +38,12 @@ bool init(Game* game, State** pp_state) { GfxCore* gfxcore = gfx_get_core(game->gfx); const Texture* texture = gfx_load_texture( - game->gfx, &(LoadTextureCmd){ - .origin = AssetFromFile, - .type = LoadTexture, - .filtering = LinearFiltering, - .mipmaps = false, - .data.texture.filepath = mstring_make(texture_file)}); + game->gfx, + &(LoadTextureCmd){.origin = AssetFromFile, + .type = LoadTexture, + .filtering = LinearFiltering, + .mipmaps = false, + .data.texture.filepath = mstring_make(texture_file)}); if (!texture) { goto cleanup; } @@ -57,11 +59,10 @@ bool init(Game* game, State** pp_state) { } MaterialDesc material_desc = (MaterialDesc){.num_uniforms = 1}; - material_desc.uniforms[0] = (ShaderUniform){ - .type = UniformTexture, - .value.texture = texture, - .name = sstring_make("Texture")}; - Material* material = gfx_make_material(&material_desc); + material_desc.uniforms[0] = (ShaderUniform){.type = UniformTexture, + .value.texture = texture, + .name = sstring_make("Texture")}; + Material* material = gfx_make_material(&material_desc); if (!material) { goto cleanup; } @@ -123,10 +124,9 @@ void render(const Game* game, const State* state) { Renderer* renderer = gfx_get_renderer(game->gfx); gfx_render_scene( - renderer, &(RenderSceneParams){ - .mode = RenderDefault, - .scene = state->scene, - .camera = state->camera}); + renderer, &(RenderSceneParams){.mode = RenderDefault, + .scene = state->scene, + .camera = state->camera}); } void resize(Game* game, State* state, int width, int height) { -- cgit v1.2.3