compositor: Generate Framebuffer in the backends
This commit is contained in:
parent
1b765ffb8c
commit
5b2cb6f911
@ -352,6 +352,9 @@ drm_compositor_create(struct wl_display *display, int connector)
|
||||
ec->base.create_buffer = wlsc_drm_buffer_create;
|
||||
ec->base.focus = 1;
|
||||
|
||||
glGenFramebuffers(1, &ec->base.fbo);
|
||||
glBindFramebuffer(GL_FRAMEBUFFER, ec->base.fbo);
|
||||
|
||||
/* Can't init base class until we have a current egl context */
|
||||
if (wlsc_compositor_init(&ec->base, display) < 0)
|
||||
return NULL;
|
||||
|
@ -519,6 +519,9 @@ wayland_compositor_create(struct wl_display *display, int width, int height)
|
||||
c->base.present = wayland_compositor_present;
|
||||
c->base.create_buffer = wlsc_drm_buffer_create;
|
||||
|
||||
glGenFramebuffers(1, &c->base.fbo);
|
||||
glBindFramebuffer(GL_FRAMEBUFFER, c->base.fbo);
|
||||
|
||||
/* Can't init base class until we have a current egl context */
|
||||
if (wlsc_compositor_init(&c->base, display) < 0)
|
||||
return NULL;
|
||||
|
@ -731,6 +731,9 @@ x11_compositor_create(struct wl_display *display, int width, int height)
|
||||
c->base.present = x11_compositor_present;
|
||||
c->base.create_buffer = wlsc_drm_buffer_create;
|
||||
|
||||
glGenFramebuffers(1, &c->base.fbo);
|
||||
glBindFramebuffer(GL_FRAMEBUFFER, c->base.fbo);
|
||||
|
||||
/* Can't init base class until we have a current egl context */
|
||||
if (wlsc_compositor_init(&c->base, display) < 0)
|
||||
return NULL;
|
||||
|
@ -1353,8 +1353,6 @@ wlsc_compositor_init(struct wlsc_compositor *ec, struct wl_display *display)
|
||||
return -1;
|
||||
}
|
||||
|
||||
glGenFramebuffers(1, &ec->fbo);
|
||||
glBindFramebuffer(GL_FRAMEBUFFER, ec->fbo);
|
||||
glActiveTexture(GL_TEXTURE0);
|
||||
if (init_shaders(ec) < 0)
|
||||
return -1;
|
||||
|
Loading…
Reference in New Issue
Block a user