From d7160d62b5d78e9191b4d61d7f491deb728cb478 Mon Sep 17 00:00:00 2001 From: quou Date: Sat, 13 Jul 2024 23:46:14 +1000 Subject: Model loading and basic lighting. --- render.h | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'render.h') diff --git a/render.h b/render.h index 784d0a7..91817d7 100644 --- a/render.h +++ b/render.h @@ -24,10 +24,20 @@ typedef struct { int w, h; } 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 -- cgit v1.2.3-54-g00ecf