summaryrefslogtreecommitdiff
path: root/src/rendering.c
diff options
context:
space:
mode:
authoronelin <oscar@nelin.dk>2025-12-03 22:13:35 +0000
committeronelin <oscar@nelin.dk>2025-12-18 21:14:21 +0000
commit38693905261fc84d60ef9993aa9bd3cd837a5865 (patch)
treec4828b381598b00a7e57d7f3b373508d778cc439 /src/rendering.c
parent3a9964b094ec10e8f47b53a57448081342134df3 (diff)
Set clearcolor for debugging
Diffstat (limited to 'src/rendering.c')
-rw-r--r--src/rendering.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/rendering.c b/src/rendering.c
index d570606..19c77d6 100644
--- a/src/rendering.c
+++ b/src/rendering.c
@@ -434,11 +434,13 @@ int renderbatch_refresh(RenderBatch* renderbatch) {
void render_begin(Window* w) {
glfwMakeContextCurrent(w->window);
((GladGLContext*)w->context)->BindFramebuffer(GL_FRAMEBUFFER, 0);
+ ((GladGLContext*)w->context)->ClearColor(1.f, 0.f, 1.f, 1.f);
((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)->ClearColor(0.f, 0.f, 0.f, 0.f);
((GladGLContext*)context)->Clear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
}