aboutsummaryrefslogtreecommitdiff
path: root/graphics.h
diff options
context:
space:
mode:
authorrodri <rgl@antares-labs.eu>2024-04-15 04:53:51 +0000
committerrodri <rgl@antares-labs.eu>2024-04-15 04:53:51 +0000
commit4d88a3779d1f5e15ea7ea3bca5330b9c8d1ef2fd (patch)
tree6385ecdd66209b32e4d48ac34cf7c6916f93237b /graphics.h
parent2c286986893435895528d59c7db624261ac5571b (diff)
downloadlibgraphics-4d88a3779d1f5e15ea7ea3bca5330b9c8d1ef2fd.tar.gz
libgraphics-4d88a3779d1f5e15ea7ea3bca5330b9c8d1ef2fd.tar.bz2
libgraphics-4d88a3779d1f5e15ea7ea3bca5330b9c8d1ef2fd.zip
implement a fully concurrent pipeline based on tiles.
- got rid of the z-buffer lock to avoid contention. - little improvements to fb.c
Diffstat (limited to 'graphics.h')
-rw-r--r--graphics.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/graphics.h b/graphics.h
index 9a46914..612ff48 100644
--- a/graphics.h
+++ b/graphics.h
@@ -154,8 +154,8 @@ struct SUparams
Framebuf *fb;
Memimage *frag;
Renderjob *job;
-
Entity *entity;
+ OBJElem **eb, **ee;
uvlong uni_time;
@@ -177,11 +177,11 @@ struct Renderer
struct Renderjob
{
+ Ref;
Framebuf *fb;
Scene *scene;
Shadertab *shaders;
Channel *donec;
- ulong nrem; /* remaining entities to process */
Renderjob *next;
};
@@ -190,15 +190,14 @@ struct Framebuf
{
Memimage *cb; /* color buffer */
double *zbuf; /* z/depth buffer */
- Lock zbuflk;
Rectangle r;
};
struct Framebufctl
{
+ Lock;
Framebuf *fb[2]; /* double buffering */
uint idx; /* front buffer index */
- Lock swplk;
void (*draw)(Framebufctl*, Image*);
void (*memdraw)(Framebufctl*, Memimage*);