aboutsummaryrefslogtreecommitdiff
path: root/graphics.h
diff options
context:
space:
mode:
authorrodri <rgl@antares-labs.eu>2024-03-06 14:54:52 +0000
committerrodri <rgl@antares-labs.eu>2024-03-06 14:54:52 +0000
commite848ff8f07c022537fd6b369db8f126251e9b96e (patch)
tree5bfe7d21531e7c5a241108dff583b8d4d3785720 /graphics.h
parent96eb8b3c74e8d95579dbd8a3727b7c25f4d49ba2 (diff)
downloadlibgraphics-e848ff8f07c022537fd6b369db8f126251e9b96e.tar.gz
libgraphics-e848ff8f07c022537fd6b369db8f126251e9b96e.tar.bz2
libgraphics-e848ff8f07c022537fd6b369db8f126251e9b96e.zip
make the fshader return a Color instead of a Memimage. clean things up.
Diffstat (limited to 'graphics.h')
-rw-r--r--graphics.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/graphics.h b/graphics.h
index 85b60ae..94ce2ea 100644
--- a/graphics.h
+++ b/graphics.h
@@ -139,8 +139,6 @@ struct VSparams
struct FSparams
{
SUparams *su;
- Memimage *frag;
- uchar *cbuf;
Point p;
Vertex v; /* only for the attributes (varyings) */
};
@@ -150,6 +148,7 @@ struct SUparams
{
Framebuf *fb;
int id;
+ Memimage *frag;
Channel *donec;
/* TODO replace with a Scene */
@@ -158,14 +157,14 @@ struct SUparams
uvlong uni_time;
Point3 (*vshader)(VSparams*);
- Memimage *(*fshader)(FSparams*);
+ Color (*fshader)(FSparams*);
};
struct Shader
{
char *name;
- Point3 (*vshader)(VSparams*); /* vertex shader */
- Memimage *(*fshader)(FSparams*); /* fragment shader */
+ Point3 (*vshader)(VSparams*); /* vertex shader */
+ Color (*fshader)(FSparams*); /* fragment shader */
};
struct Framebuf