summaryrefslogtreecommitdiff
path: root/sway/desktop/fx_renderer/fx_framebuffer.c
diff options
context:
space:
mode:
authorWill McKinnon <[email protected]>2023-04-24 00:11:55 -0400
committerWill McKinnon <[email protected]>2023-04-24 00:11:55 -0400
commitb61041980ff06f6c2bfdee1a1cf21afd6044ae28 (patch)
tree2b17c0581449f37770ea3197b497da930589ce2f /sway/desktop/fx_renderer/fx_framebuffer.c
parent50e2422e743c0b337097dd2367f82e0d4b20fabc (diff)
store viewport width & height in fx_renderer
Diffstat (limited to 'sway/desktop/fx_renderer/fx_framebuffer.c')
-rw-r--r--sway/desktop/fx_renderer/fx_framebuffer.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/sway/desktop/fx_renderer/fx_framebuffer.c b/sway/desktop/fx_renderer/fx_framebuffer.c
index db6f8928..36652011 100644
--- a/sway/desktop/fx_renderer/fx_framebuffer.c
+++ b/sway/desktop/fx_renderer/fx_framebuffer.c
@@ -6,7 +6,7 @@ void fx_framebuffer_bind(struct fx_framebuffer *buffer, GLsizei width, GLsizei h
glViewport(0, 0, width, height);
}
-void fx_framebuffer_create(struct wlr_output *output, struct fx_framebuffer *buffer, bool bind) {
+void fx_framebuffer_create(struct fx_framebuffer *buffer, int width, int height, bool bind) {
bool firstAlloc = false;
// Create a new framebuffer
@@ -25,9 +25,6 @@ void fx_framebuffer_create(struct wlr_output *output, struct fx_framebuffer *buf
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
}
- int width, height;
- wlr_output_transformed_resolution(output, &width, &height);
-
if (firstAlloc || buffer->texture.width != width || buffer->texture.height != height) {
glBindTexture(GL_TEXTURE_2D, buffer->texture.id);
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, width, height, 0, GL_RGBA, GL_UNSIGNED_BYTE, 0);