summaryrefslogtreecommitdiff
path: root/src/rendering.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/rendering.c')
-rw-r--r--src/rendering.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/rendering.c b/src/rendering.c
index fda8ded..88b1b9c 100644
--- a/src/rendering.c
+++ b/src/rendering.c
@@ -437,6 +437,11 @@ void render_begin(Window* w) {
((GladGLContext*)w->context)->Clear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
}
+void r_clear_buffer(void *restrict context, RenderTargets *restrict t, u32 framebuffer_idx) {
+ ((GladGLContext*)context)->BindFramebuffer(GL_FRAMEBUFFER, t->framebuffer[framebuffer_idx]);
+ ((GladGLContext*)context)->Clear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
+}
+
void render_present(Window* w, RenderObject *restrict default_quad) {
const GladGLContext *restrict gl = w->context;
gl->BindFramebuffer(GL_FRAMEBUFFER, 0);