summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
author3gg <3gg@shellblade.net>2026-02-13 14:21:37 -0800
committer3gg <3gg@shellblade.net>2026-02-13 14:21:37 -0800
commitb0544549c551dfa0b52e7c685580f954861240ba (patch)
tree707de822e484eb14ebc0b3fad23e1d79ce26e305 /include
parent77f9dbee1721518e09f0beed10b3dbb78d893b08 (diff)
Emit normals
Diffstat (limited to 'include')
-rw-r--r--include/swgfx.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/include/swgfx.h b/include/swgfx.h
index b3f9150..452847c 100644
--- a/include/swgfx.h
+++ b/include/swgfx.h
@@ -37,8 +37,8 @@ typedef sgVec3 sgNormal;
37 37
38typedef struct sgVert2i { sgVec2i pos; sgVec2 uv; } sgVert2i; 38typedef struct sgVert2i { sgVec2i pos; sgVec2 uv; } sgVert2i;
39typedef struct sgVert2 { sgVec2 pos; sgVec2 uv; } sgVert2; 39typedef struct sgVert2 { sgVec2 pos; sgVec2 uv; } sgVert2;
40typedef struct sgVert3 { sgVec3 pos; sgVec2 uv; } sgVert3; 40typedef struct sgVert3 { sgVec3 pos; sgVec2 uv; sgVec3 normal; } sgVert3;
41typedef struct sgVert4 { sgVec4 pos; sgVec2 uv; } sgVert4; 41typedef struct sgVert4 { sgVec4 pos; sgVec2 uv; sgVec3 normal; } sgVert4;
42 42
43typedef struct sgQuadi { sgVert2i p0, p1; } sgQuadi; 43typedef struct sgQuadi { sgVert2i p0, p1; } sgQuadi;
44typedef struct sgQuad { sgVert2 p0, p1; } sgQuad; 44typedef struct sgQuad { sgVert2 p0, p1; } sgQuad;
@@ -108,11 +108,15 @@ void sgTriangles2 (swgfx*, size_t count, const sgTri2*);
108void sgTriangleStrip2(swgfx*, size_t count, const sgVec2*); 108void sgTriangleStrip2(swgfx*, size_t count, const sgVec2*);
109void sgTriangles (swgfx*, size_t count, const sgTri3*, const sgNormal*); 109void sgTriangles (swgfx*, size_t count, const sgTri3*, const sgNormal*);
110void sgTriangleStrip (swgfx*, size_t count, const sgVec3*, const sgNormal*); 110void sgTriangleStrip (swgfx*, size_t count, const sgVec3*, const sgNormal*);
111void sgTrianglesIndexed(swgfx*, size_t numIndices, const sgIdx* indices, const sgVec3* positions, const sgVec2* texcoords); 111void sgTrianglesIndexed(swgfx*, size_t numIndices, const sgIdx* indices, const sgVec3* positions, const sgVec2* texcoords, const sgVec3* normals);
112void sgTrianglesIndexedNonUniform(swgfx*, size_t numTris, const sgTriIdx* tris, const sgVec3* positions, const sgVec2* texcoords); 112void sgTrianglesIndexedNonUniform(swgfx*, size_t numTris, const sgTriIdx* tris, const sgVec3* positions, const sgVec2* texcoords, const sgVec3* normals);
113 113
114void sgLighting(swgfx*); 114void sgLighting(swgfx*);
115void sgAmbient(swgfx*, sgVec3 ambient); 115void sgAmbient(swgfx*, sgVec3 ambient);
116// TODO: Implement directional lights.
117
118void sgDepth(swgfx*);
119void sgNormals(swgfx*);
116 120
117void sgGamma (swgfx*, sgPixel*, int width, int height); 121void sgGamma (swgfx*, sgPixel*, int width, int height);
118void sgGammaInv(swgfx*, sgPixel*, int width, int height); 122void sgGammaInv(swgfx*, sgPixel*, int width, int height);