aboutsummaryrefslogtreecommitdiff
path: root/internal.h
diff options
context:
space:
mode:
Diffstat (limited to 'internal.h')
-rw-r--r--internal.h39
1 files changed, 36 insertions, 3 deletions
diff --git a/internal.h b/internal.h
index 7f0d648..6e66229 100644
--- a/internal.h
+++ b/internal.h
@@ -1,8 +1,35 @@
-typedef struct Jobqueue Jobqueue;
+typedef struct Polygon Polygon;
+typedef struct Tilerparam Tilerparam;
+typedef struct Rasterparam Rasterparam;
+typedef struct Rastertask Rastertask;
-struct Jobqueue
+struct Polygon
{
- Renderjob *hd, *tl;
+ Vertex *v;
+ ulong n;
+ ulong cap;
+};
+
+struct Tilerparam
+{
+ int id;
+ Channel *paramsc;
+ Channel **taskchans; /* Channel*[nproc] */
+ Rectangle *wr; /* Rectangle[nproc] */
+ ulong nproc;
+};
+
+struct Rasterparam
+{
+ int id;
+ Channel *taskc;
+};
+
+struct Rastertask
+{
+ SUparams *params;
+ Rectangle wr; /* working rect */
+ Primitive p;
};
/* alloc */
@@ -23,9 +50,15 @@ void berpvertex(Vertex*, Vertex*, Vertex*, Vertex*, Point3);
void delvattrs(Vertex*);
void fprintvattrs(int, Vertex*);
+/* clip */
+int clipprimitive(Primitive*);
+int rectclipline(Rectangle, Point*, Point*);
+
/* util */
int min(int, int);
int max(int, int);
+void swapi(int*, int*);
+void swappt(Point*, Point*);
void memsetd(double*, double, usize);
/* nanosec */