diff options
Diffstat (limited to 'render.h')
-rw-r--r-- | render.h | 24 |
1 files changed, 22 insertions, 2 deletions
@@ -37,10 +37,23 @@ typedef struct Mesh { typedef struct { Colour* t; int* d; - int w, h, asp; + int asp, n; + int vp[4]; Rect clip; } Renderer; +int tri_os( + const Renderer* r, + const int* v0, + const int* v1, + const int* v2 +); +int point_os( + const Renderer* r, + int x, + int y +); + void ren_begin(Renderer* r, Colour* t, int* d, int w, int h); void ren_end(Renderer* r); void ren_clear(Renderer* r); @@ -86,7 +99,14 @@ void ren_tri( const int* v1, const int* v2, const Bitmap* tex -); +); /* Unsafe for 3D. Clips against the r->clip */ +void ren_tri3( + Renderer* r, + const int* v0, + const int* v1, + const int* v2, + const Bitmap* tex +); /* Does perspective calculation and clips against the near. */ void ren_mesh( Renderer* r, const Mesh* mesh, |