gtk/imgui_widget: remove direct call to glClearColor

Since the refactor to move our OpenGL context off-thread there is no more
GLAD context loaded on the main thread for this widget, so calling ANY
OpenGL function will crash the entire app.

I don't think the call even worked as intended? I at least can't seem to
tell any difference when the clear commands are simply removed.
Maybe they were useful before.
This commit is contained in:
Leah Amelia Chen
2026-09-17 23:35:11 +08:00
parent 851cd4dc13
commit 0fca3d34a5
2 changed files with 4 additions and 3 deletions

4
passthrough.glsl Normal file
View File

@@ -0,0 +1,4 @@
void mainImage(out vec4 fragColor, in vec2 fragCoord) {
vec2 uv = fragCoord / iResolution.xy;
fragColor = vec4(texture(iChannel0, uv).rgb, 1.0);
}

View File

@@ -317,9 +317,6 @@ pub const ImguiWidget = extern struct {
cimgui.c.ImGui_Render();
}
// OpenGL final render
gl.clearColor(0x28 / 0xFF, 0x2C / 0xFF, 0x34 / 0xFF, 1.0);
gl.clear(gl.c.GL_COLOR_BUFFER_BIT);
cimgui.ImGui_ImplOpenGL3_RenderDrawData(cimgui.c.ImGui_GetDrawData());
return @intFromBool(true);