diff options
| author | 3gg <3gg@shellblade.net> | 2026-02-05 17:16:39 -0800 |
|---|---|---|
| committer | 3gg <3gg@shellblade.net> | 2026-02-05 17:16:39 -0800 |
| commit | d44df852bbdcb58d634413d69eaa288a7b4573f3 (patch) | |
| tree | cdf00d21aea252d379129e957cc29e5b48ac76b1 /include/swgfx.h | |
| parent | 9e5db7c33df67d80f49f4efd7b8ace5f27e2e7cb (diff) | |
Expose texture filter.
Diffstat (limited to 'include/swgfx.h')
| -rw-r--r-- | include/swgfx.h | 7 |
1 files changed, 6 insertions, 1 deletions
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; | |||
| 53 | // TODO: Expose a macro to control the desired surface format. | 53 | // TODO: Expose a macro to control the desired surface format. |
| 54 | typedef sgBgra sgScreenPixel; | 54 | typedef sgBgra sgScreenPixel; |
| 55 | 55 | ||
| 56 | typedef enum sgTextureFilter { | ||
| 57 | sgNearest, | ||
| 58 | sgBilinear | ||
| 59 | } sgTextureFilter; | ||
| 60 | |||
| 56 | typedef struct sgImage { | 61 | typedef struct sgImage { |
| 57 | int width; | 62 | int width; |
| 58 | int height; | 63 | int height; |
| @@ -76,7 +81,7 @@ void sgOrtho (swgfx*, R left, R right, R top, R bottom, R near, R far); | |||
| 76 | void sgPerspective(swgfx*, R fovy, R aspect, R near, R far); | 81 | void sgPerspective(swgfx*, R fovy, R aspect, R near, R far); |
| 77 | void sgViewport (swgfx*, int x0, int y0, int width, int height); | 82 | void sgViewport (swgfx*, int x0, int y0, int width, int height); |
| 78 | 83 | ||
| 79 | void sgTexture(swgfx*, const sgImage*); | 84 | void sgTexture(swgfx*, const sgImage*, sgTextureFilter); |
| 80 | 85 | ||
| 81 | void sgClear(swgfx*); | 86 | void sgClear(swgfx*); |
| 82 | void sgPixels(swgfx*, size_t count, const sgVec2i* positions, sgPixel colour); | 87 | void sgPixels(swgfx*, size_t count, const sgVec2i* positions, sgPixel colour); |
