summaryrefslogtreecommitdiff
path: root/render.h
diff options
context:
space:
mode:
authorquou <quou@disroot.org>2024-07-13 23:46:14 +1000
committerquou <quou@disroot.org>2024-07-13 23:46:31 +1000
commitd7160d62b5d78e9191b4d61d7f491deb728cb478 (patch)
tree0bbb087df0fa32b2e47f00d8fc602f4921eec5a7 /render.h
parenta43eb70ebe7844db0a4ffece47c22ae12384781b (diff)
Model loading and basic lighting.
Diffstat (limited to 'render.h')
-rw-r--r--render.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/render.h b/render.h
index 784d0a7..91817d7 100644
--- a/render.h
+++ b/render.h
@@ -25,9 +25,19 @@ typedef struct {
} Bitmap;
typedef struct {
+ unsigned short p, n, t;
+} Mesh_Vert;
+
+typedef struct Mesh {
+ int vc, pc, nc, tc;
+ int* p, * n, * t;
+ Mesh_Vert* verts;
+} Mesh;
+
+typedef struct {
Colour* t;
int* d;
- int w, h;
+ int w, h, asp;
Rect clip;
} Renderer;
@@ -63,5 +73,10 @@ void ren_tri(
const int* v2,
const Bitmap* tex
);
+void ren_mesh(
+ Renderer* r,
+ const Mesh* mesh,
+ const Bitmap* tex
+);
#endif