summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/swgfx.h20
1 files changed, 12 insertions, 8 deletions
diff --git a/include/swgfx.h b/include/swgfx.h
index 005359b..970e3fa 100644
--- a/include/swgfx.h
+++ b/include/swgfx.h
@@ -25,14 +25,18 @@ typedef struct sgVec4 { R x, y, z, w; } sgVec4;
25 25
26typedef sgVec3 sgNormal; 26typedef sgVec3 sgNormal;
27 27
28typedef struct sgQuadi { sgVec2i p0, p1; } sgQuadi; 28typedef struct sgVert2i { sgVec2i pos; sgVec2 uv; } sgVert2i;
29typedef struct sgQuad { sgVec2 p0, p1; } sgQuad; 29typedef struct sgVert2 { sgVec2 pos; sgVec2 uv; } sgVert2;
30typedef struct sgTri2 { sgVec2 p0, p1, p2; } sgTri2; 30typedef struct sgVert3 { sgVec3 pos; sgVec2 uv; } sgVert3;
31typedef struct sgTri3 { sgVec3 p0, p1, p2; } sgTri3; 31
32typedef struct sgQuadi { sgVert2i p0, p1; } sgQuadi;
33typedef struct sgQuad { sgVert2 p0, p1; } sgQuad;
34typedef struct sgTri2 { sgVert2 p0, p1, p2; } sgTri2;
35typedef struct sgTri3 { sgVert3 p0, p1, p2; } sgTri3;
32 36
33typedef uint16_t sgIdx; 37typedef uint16_t sgIdx;
34typedef struct sgVert { sgIdx position, normal, texcoord; } sgVert; 38typedef struct sgVertIdx { sgIdx pos, uv, normal; } sgVertIdx;
35typedef struct sgTriIdx { sgVert v0, v1, v2; } sgTriIdx; 39typedef struct sgTriIdx { sgVertIdx v0, v1, v2; } sgTriIdx;
36 40
37// TODO: Should we use real-valued colours? 41// TODO: Should we use real-valued colours?
38typedef struct sgPixel { uint8_t r, g, b, a; } sgPixel; 42typedef struct sgPixel { uint8_t r, g, b, a; } sgPixel;
@@ -62,7 +66,7 @@ void sgTriangles2 (swgfx*, size_t count, const sgTri2*);
62void sgTriangleStrip2(swgfx*, size_t count, const sgVec2*); 66void sgTriangleStrip2(swgfx*, size_t count, const sgVec2*);
63void sgTriangles (swgfx*, size_t count, const sgTri3*, const sgNormal*); 67void sgTriangles (swgfx*, size_t count, const sgTri3*, const sgNormal*);
64void sgTriangleStrip (swgfx*, size_t count, const sgVec3*, const sgNormal*); 68void sgTriangleStrip (swgfx*, size_t count, const sgVec3*, const sgNormal*);
65void sgTrianglesIndexed(swgfx*, size_t numIndices, const sgIdx* indices, const sgVec3* positions); 69void sgTrianglesIndexed(swgfx*, size_t numIndices, const sgIdx* indices, const sgVec3* positions, const sgVec2* texcoords);
66void sgTrianglesIndexedNonUniform(swgfx*, size_t numTris, const sgTriIdx* tris, const sgVec3* positions); 70void sgTrianglesIndexedNonUniform(swgfx*, size_t numTris, const sgTriIdx* tris, const sgVec3* positions, const sgVec2* texcoords);
67 71
68void sgCheck(swgfx*); 72void sgCheck(swgfx*);