summaryrefslogtreecommitdiff
path: root/src/shader-node.c
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2022-11-09 13:38:36 -0800
committerVito Caputo <vcaputo@pengaru.com>2022-11-10 09:11:47 -0800
commitaa20a9ec8697a05d44e949ad6a1f2b2f6a3fe908 (patch)
tree6be3cf20e101e7ed37884081bf3c18fb4dc63b66 /src/shader-node.c
parent474bbf1b635ba50fd2abf1cef24f352bd7916dd2 (diff)
libstage: bump libstage for new render_func
Newer libstage enables the render_func to free its stage node via return value. This is useful for fire-and-forget style ephemeral nodes that make for convenient autonomous stage nodes which remove themselves after running their course. Think bonus scores and little visual effects... Requires some mechanical changes to the existing render funcs, but nothing functionally has really changed.
Diffstat (limited to 'src/shader-node.c')
-rw-r--r--src/shader-node.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/shader-node.c b/src/shader-node.c
index 5a21c89..3f1cce1 100644
--- a/src/shader-node.c
+++ b/src/shader-node.c
@@ -60,7 +60,7 @@ static const float texcoords[] = {
};
-static void shader_node_render(const stage_t *stage, void *object, float alpha, void *render_ctxt)
+static stage_render_func_ret_t shader_node_render(const stage_t *stage, void *object, float alpha, void *render_ctxt)
{
shader_node_t *shader_node = object;
unsigned n_uniforms;
@@ -93,6 +93,8 @@ static void shader_node_render(const stage_t *stage, void *object, float alpha,
glDrawArrays(GL_TRIANGLES, 0, 6);
glUseProgram(0);
glBindBuffer(GL_ARRAY_BUFFER, 0);
+
+ return STAGE_RENDER_FUNC_RET_CONTINUE;
}
© All Rights Reserved