summaryrefslogtreecommitdiff
path: root/src/stage.h
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2019-05-10 00:54:00 -0700
committerVito Caputo <vcaputo@pengaru.com>2019-05-10 14:18:28 -0700
commit7eceed2d2f8b99d8300ae828cb942f44f6351b03 (patch)
tree152e314a03d003833ee9d53acecce0ad2e21ad48 /src/stage.h
parent7c359879af46c63d93ad9190a18da04bbeb492bb (diff)
libstage: add pass-thru pointer to stage_render()
It's common to need access to some rendering context from the per-stage render functions, this simply plumbs an opaque pointer from stage_render() down to the render functions.
Diffstat (limited to 'src/stage.h')
-rw-r--r--src/stage.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/stage.h b/src/stage.h
index 31f134a..5416af6 100644
--- a/src/stage.h
+++ b/src/stage.h
@@ -22,14 +22,14 @@
typedef struct stage_t stage_t;
-typedef void (stage_render_func_t)(const stage_t *stage, void *object, float alpha);
+typedef void (stage_render_func_t)(const stage_t *stage, void *object, float alpha, void *render_ctxt);
typedef void (stage_free_func_t)(const stage_t *stage, void *object);
typedef int (stage_match_func_t)(const stage_t *stage, void *object, void *key);
stage_t * stage_new(stage_t *parent, int layer, const char *name, void *object, stage_render_func_t *render_func, stage_free_func_t *free_func, stage_match_func_t *match_func);
void stage_replace(stage_t *stage, const char *name, void *object, stage_render_func_t *render_func, stage_free_func_t *free_func, stage_match_func_t *match_func);
stage_t * stage_free(stage_t *stage);
-void stage_render(const stage_t *stage);
+void stage_render(const stage_t *stage, void *render_ctxt);
void stage_clear(stage_t *stage);
void stage_set_object(stage_t *stage, void *object);
void * stage_get_object(const stage_t *stage);
© All Rights Reserved