aboutsummaryrefslogtreecommitdiffstats
path: root/src/output.zig
diff options
context:
space:
mode:
authors-ol <s+removethis@s-ol.nu>2025-03-16 20:49:57 +0000
committers-ol <s+removethis@s-ol.nu>2025-03-16 20:49:57 +0000
commita4a4b2d3d3cc026aedeeef9241b894dff2d3684d (patch)
tree3d9527d050f003d646b1a6da9c6300f4310ff504 /src/output.zig
parentdefault output size to render size (diff)
downloadglsl-view-a4a4b2d3d3cc026aedeeef9241b894dff2d3684d.tar.gz
glsl-view-a4a4b2d3d3cc026aedeeef9241b894dff2d3684d.zip
enable transparent framebuffer
Diffstat (limited to 'src/output.zig')
-rw-r--r--src/output.zig6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/output.zig b/src/output.zig
index 6eea72e..593caac 100644
--- a/src/output.zig
+++ b/src/output.zig
@@ -138,6 +138,9 @@ pub const WindowOutput = struct {
const self = allocator.create(WindowOutput) catch unreachable;
c.glfwDefaultWindowHints();
+ c.glfwWindowHint(c.GLFW_FOCUSED, c.GLFW_FALSE);
+ c.glfwWindowHint(c.GLFW_FLOATING, c.GLFW_TRUE);
+ c.glfwWindowHint(c.GLFW_TRANSPARENT_FRAMEBUFFER, c.GL_TRUE);
self.* = .{
.constants = constants,
@@ -173,7 +176,10 @@ pub const WindowOutput = struct {
return true;
c.glfwMakeContextCurrent(self.window);
+ c.glClearColor(0, 0, 0, 1);
c.glClear(c.GL_COLOR_BUFFER_BIT);
+ c.glfwWindowHint(c.GLFW_RESIZABLE, c.GLFW_FALSE);
+ c.glfwWindowHint(c.GLFW_DECORATED, c.GLFW_FALSE);
if (self.resized) {
var width: c_int = undefined;