summaryrefslogtreecommitdiff
path: root/render.h
diff options
context:
space:
mode:
Diffstat (limited to 'render.h')
-rw-r--r--render.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/render.h b/render.h
index e51478f..996ba37 100644
--- a/render.h
+++ b/render.h
@@ -24,6 +24,10 @@ typedef struct {
int w, h;
} Bitmap;
+typedef struct Texture {
+ int w, h;
+} Texture;
+
typedef struct {
unsigned short p, n, t;
} Mesh_Vert;
@@ -54,6 +58,8 @@ int point_os(
int y
);
+Colour sample_tex(const Texture* t, int u, int v);
+
void ren_begin(Renderer* r, Colour* t, int* d, int w, int h);
void ren_end(Renderer* r);
void ren_clear(Renderer* r);
@@ -98,19 +104,19 @@ void ren_tri(
const int* v0,
const int* v1,
const int* v2,
- const Bitmap* tex
+ const Texture* 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
+ const Texture* tex
); /* Does perspective calculation and clips against the near. */
void ren_mesh(
Renderer* r,
const Mesh* mesh,
- const Bitmap* tex
+ const Texture* tex
);
#endif