diff options
author | rodri <rgl@antares-labs.eu> | 2024-05-03 13:32:48 +0000 |
---|---|---|
committer | rodri <rgl@antares-labs.eu> | 2024-05-03 13:32:48 +0000 |
commit | b429311ed087ee7cf7fc7771a8e1834ea074f8da (patch) | |
tree | ef05d69723ebcdf89a2d8a25b069075b2b51fc63 /util.c | |
parent | cf3e0cb65c03955ef18624a50b9e33c3f6e8c6e5 (diff) | |
download | libgraphics-b429311ed087ee7cf7fc7771a8e1834ea074f8da.tar.gz libgraphics-b429311ed087ee7cf7fc7771a8e1834ea074f8da.tar.bz2 libgraphics-b429311ed087ee7cf7fc7771a8e1834ea074f8da.zip |
add a general primitive with support for points, lines and triangles.
also got rid of the dependency on OBJ for the entire renderer,
instead letting the user load a Model from any given OBJ. this
modularity will allow for other formats to be used in the same
way, relying on a single, internal representation for the
entire pipeline.
Diffstat (limited to 'util.c')
-rw-r--r-- | util.c | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -33,6 +33,26 @@ fmax(double a, double b) } void +swapi(int *a, int *b) +{ + int t; + + t = *a; + *a = *b; + *b = t; +} + +void +swappt(Point *a, Point *b) +{ + Point t; + + t = *a; + *a = *b; + *b = t; +} + +void memsetd(double *p, double v, usize len) { double *dp; |