summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
author3gg <3gg@shellblade.net>2026-02-05 17:17:03 -0800
committer3gg <3gg@shellblade.net>2026-02-05 17:17:03 -0800
commit08504ec924a0d6c78f615d8c449a47954e36ab61 (patch)
tree151132c6137e41d1497550f5c6ffd9e4f3aac283 /src/main.c
parentcd6d2340a6fcbd2376aad291081ae5d667bd3317 (diff)
Pass in texture filter
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c
index 225af5f..6d7a72d 100644
--- a/src/main.c
+++ b/src/main.c
@@ -28,7 +28,7 @@ static constexpr int WindowHeight = 480;
28static constexpr sgVec2i WindowDims = (sgVec2i){.x = WindowWidth, .y = WindowHeight}; 28static constexpr sgVec2i WindowDims = (sgVec2i){.x = WindowWidth, .y = WindowHeight};
29 29
30static constexpr R Fovy = (R)(90 * TO_RAD); 30static constexpr R Fovy = (R)(90 * TO_RAD);
31static constexpr R Near = 0.1f; 31static constexpr R Near = 0.01f;
32static constexpr R Far = 100.0f; 32static constexpr R Far = 100.0f;
33 33
34static constexpr size_t MaxTextures = 256; 34static constexpr size_t MaxTextures = 256;
@@ -215,7 +215,7 @@ static void RenderModel(swgfx* gfx, const sgImage* textures, const Model* model)
215 // single model. Generalize later. 215 // single model. Generalize later.
216 assert((size_t)object->material < MaxTextures); 216 assert((size_t)object->material < MaxTextures);
217 const sgImage* texture = &textures[object->material]; 217 const sgImage* texture = &textures[object->material];
218 sgTexture(gfx, texture); 218 sgTexture(gfx, texture, sgBilinear);
219 switch (model->type) { 219 switch (model->type) {
220 case ModelTypeIndexed: RenderIndexedModel(gfx, &model->indexed, object); break; 220 case ModelTypeIndexed: RenderIndexedModel(gfx, &model->indexed, object); break;
221 case ModelTypeFlat: /* TODO: Render flat models. */ break; 221 case ModelTypeFlat: /* TODO: Render flat models. */ break;