aboutsummaryrefslogtreecommitdiff
path: root/graphics.h
diff options
context:
space:
mode:
authorrodri <rgl@antares-labs.eu>2024-02-27 11:29:06 +0000
committerrodri <rgl@antares-labs.eu>2024-02-27 11:29:06 +0000
commite0baf147d655409b721e41b0e3effabd39a96b34 (patch)
treeddfe6bbcaa5651650e8ff1f6e0b3b4dcc0bf07ee /graphics.h
parentc0bc9d332f3ab51a43d5e3d0da2d5a32e938b1d2 (diff)
downloadlibgraphics-e0baf147d655409b721e41b0e3effabd39a96b34.tar.gz
libgraphics-e0baf147d655409b721e41b0e3effabd39a96b34.tar.bz2
libgraphics-e0baf147d655409b721e41b0e3effabd39a96b34.zip
have separate routines for drawing and memdrawing.
Diffstat (limited to 'graphics.h')
-rw-r--r--graphics.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/graphics.h b/graphics.h
index e98ae9a..1e04c13 100644
--- a/graphics.h
+++ b/graphics.h
@@ -39,6 +39,7 @@ struct Vertex
Color c; /* shading color */
Point2 uv; /* texture coordinate */
+ /* TODO these attributes should be replaced by a hash table */
double intensity;
Point3 pos;
};
@@ -147,7 +148,8 @@ struct Framebufctl
uint idx; /* front buffer index */
Lock swplk;
- void (*draw)(Framebufctl*, Memimage*);
+ void (*draw)(Framebufctl*, Image*);
+ void (*memdraw)(Framebufctl*, Memimage*);
void (*swap)(Framebufctl*);
void (*reset)(Framebufctl*);
};
@@ -156,6 +158,9 @@ struct Viewport
{
RFrame;
Framebufctl *fbctl;
+
+ void (*draw)(Viewport*, Image*);
+ void (*memdraw)(Viewport*, Memimage*);
};
struct Camera