From d44df852bbdcb58d634413d69eaa288a7b4573f3 Mon Sep 17 00:00:00 2001 From: 3gg <3gg@shellblade.net> Date: Thu, 5 Feb 2026 17:16:39 -0800 Subject: Expose texture filter. --- include/swgfx.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/swgfx.h b/include/swgfx.h index cdeefe8..e9e69b8 100644 --- a/include/swgfx.h +++ b/include/swgfx.h @@ -53,6 +53,11 @@ typedef sgRgba sgPixel; // TODO: Expose a macro to control the desired surface format. typedef sgBgra sgScreenPixel; +typedef enum sgTextureFilter { + sgNearest, + sgBilinear +} sgTextureFilter; + typedef struct sgImage { int width; int height; @@ -76,7 +81,7 @@ void sgOrtho (swgfx*, R left, R right, R top, R bottom, R near, R far); void sgPerspective(swgfx*, R fovy, R aspect, R near, R far); void sgViewport (swgfx*, int x0, int y0, int width, int height); -void sgTexture(swgfx*, const sgImage*); +void sgTexture(swgfx*, const sgImage*, sgTextureFilter); void sgClear(swgfx*); void sgPixels(swgfx*, size_t count, const sgVec2i* positions, sgPixel colour); -- cgit v1.2.3