aboutsummaryrefslogtreecommitdiff
path: root/render/gles2/pass.c
diff options
context:
space:
mode:
Diffstat (limited to 'render/gles2/pass.c')
-rw-r--r--render/gles2/pass.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/render/gles2/pass.c b/render/gles2/pass.c
index 4adad49f..f8a0f3e8 100644
--- a/render/gles2/pass.c
+++ b/render/gles2/pass.c
@@ -260,6 +260,11 @@ struct wlr_gles2_render_pass *begin_gles2_buffer_pass(struct wlr_gles2_buffer *b
}
}
+ GLint fbo = gles2_buffer_get_fbo(buffer);
+ if (!fbo) {
+ return NULL;
+ }
+
struct wlr_gles2_render_pass *pass = calloc(1, sizeof(*pass));
if (pass == NULL) {
return NULL;
@@ -274,7 +279,7 @@ struct wlr_gles2_render_pass *begin_gles2_buffer_pass(struct wlr_gles2_buffer *b
WL_OUTPUT_TRANSFORM_FLIPPED_180);
push_gles2_debug(renderer);
- glBindFramebuffer(GL_FRAMEBUFFER, buffer->fbo);
+ glBindFramebuffer(GL_FRAMEBUFFER, fbo);
glViewport(0, 0, wlr_buffer->width, wlr_buffer->height);
glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);