summaryrefslogtreecommitdiff
path: root/graphics.h
diff options
context:
space:
mode:
authorrodri <rgl@antares-labs.eu>2024-06-14 15:01:15 +0000
committerrodri <rgl@antares-labs.eu>2024-06-14 15:01:15 +0000
commitc69735e24f7c5926ed63ff8c5292be282aa8b240 (patch)
tree6c941bfd052eb0b603d591695034543a53b7f43d /graphics.h
parentb1335875b19a4db2ae028f8d790784cddcffe8b5 (diff)
downloadlibgraphics-c69735e24f7c5926ed63ff8c5292be282aa8b240.tar.gz
libgraphics-c69735e24f7c5926ed63ff8c5292be282aa8b240.tar.bz2
libgraphics-c69735e24f7c5926ed63ff8c5292be282aa8b240.zip
fix the barycoords routine to avoid reporting false degenerates.
added a normals buffer for debugging.
Diffstat (limited to 'graphics.h')
-rw-r--r--graphics.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/graphics.h b/graphics.h
index 17ce25e..7b46ed7 100644
--- a/graphics.h
+++ b/graphics.h
@@ -227,6 +227,7 @@ struct Framebuf
{
ulong *cb; /* color buffer */
double *zb; /* z/depth buffer */
+ ulong *nb; /* normals buffer (DBG only) */
Rectangle r;
};
@@ -238,6 +239,7 @@ struct Framebufctl
void (*draw)(Framebufctl*, Image*);
void (*memdraw)(Framebufctl*, Memimage*);
+ void (*drawnormals)(Framebufctl*, Image*);
void (*swap)(Framebufctl*);
void (*reset)(Framebufctl*);
Framebuf *(*getfb)(Framebufctl*);