diff options
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 72164b1..a1ce872 100644 --- a/include/swgfx.h +++ b/include/swgfx.h | |||
| @@ -24,6 +24,8 @@ Multi-threading: | |||
| 24 | 24 | ||
| 25 | #define SWGFX_PROFILING 1 // TODO: Move this to client project cmake. | 25 | #define SWGFX_PROFILING 1 // TODO: Move this to client project cmake. |
| 26 | 26 | ||
| 27 | constexpr size_t SWGFX_MAX_TEXTURES = 255; | ||
| 28 | |||
| 27 | typedef float R; | 29 | typedef float R; |
| 28 | 30 | ||
| 29 | typedef struct sgVec2i { int x, y; } sgVec2i; | 31 | typedef struct sgVec2i { int x, y; } sgVec2i; |
| @@ -55,6 +57,8 @@ typedef sgRgba sgPixel; | |||
| 55 | // TODO: Expose a macro to control the desired surface format. | 57 | // TODO: Expose a macro to control the desired surface format. |
| 56 | typedef sgBgra sgScreenPixel; | 58 | typedef sgBgra sgScreenPixel; |
| 57 | 59 | ||
| 60 | typedef uint16_t sgTextureId; | ||
| 61 | |||
| 58 | typedef enum sgTextureFilter { | 62 | typedef enum sgTextureFilter { |
| 59 | sgNearest, | 63 | sgNearest, |
| 60 | sgBilinear | 64 | sgBilinear |
| @@ -93,7 +97,8 @@ void sgOrtho (swgfx*, R left, R right, R top, R bottom, R near, R far); | |||
| 93 | void sgPerspective(swgfx*, R fovy, R aspect, R near, R far); | 97 | void sgPerspective(swgfx*, R fovy, R aspect, R near, R far); |
| 94 | void sgViewport (swgfx*, int x0, int y0, int width, int height); | 98 | void sgViewport (swgfx*, int x0, int y0, int width, int height); |
| 95 | 99 | ||
| 96 | void sgTexture(swgfx*, const sgImage*, sgTextureFilter); | 100 | void sgTextureRegister(swgfx*, sgTextureId, const sgImage*, sgTextureFilter); |
| 101 | void sgTextureActivate(swgfx*, sgTextureId); | ||
| 97 | 102 | ||
| 98 | void sgClear(swgfx*); | 103 | void sgClear(swgfx*); |
| 99 | void sgPixels(swgfx*, size_t count, const sgVec2i* positions, sgPixel colour); | 104 | void sgPixels(swgfx*, size_t count, const sgVec2i* positions, sgPixel colour); |
