compositor: Generate Framebuffer in the backends

dev
Benjamin Franzke 14 years ago
parent 1b765ffb8c
commit 5b2cb6f911
  1. 3
      compositor/compositor-drm.c
  2. 3
      compositor/compositor-wayland.c
  3. 3
      compositor/compositor-x11.c
  4. 2
      compositor/compositor.c

@ -352,6 +352,9 @@ drm_compositor_create(struct wl_display *display, int connector)
ec->base.create_buffer = wlsc_drm_buffer_create; ec->base.create_buffer = wlsc_drm_buffer_create;
ec->base.focus = 1; 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 */ /* Can't init base class until we have a current egl context */
if (wlsc_compositor_init(&ec->base, display) < 0) if (wlsc_compositor_init(&ec->base, display) < 0)
return NULL; 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.present = wayland_compositor_present;
c->base.create_buffer = wlsc_drm_buffer_create; 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 */ /* Can't init base class until we have a current egl context */
if (wlsc_compositor_init(&c->base, display) < 0) if (wlsc_compositor_init(&c->base, display) < 0)
return NULL; 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.present = x11_compositor_present;
c->base.create_buffer = wlsc_drm_buffer_create; 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 */ /* Can't init base class until we have a current egl context */
if (wlsc_compositor_init(&c->base, display) < 0) if (wlsc_compositor_init(&c->base, display) < 0)
return NULL; return NULL;

@ -1353,8 +1353,6 @@ wlsc_compositor_init(struct wlsc_compositor *ec, struct wl_display *display)
return -1; return -1;
} }
glGenFramebuffers(1, &ec->fbo);
glBindFramebuffer(GL_FRAMEBUFFER, ec->fbo);
glActiveTexture(GL_TEXTURE0); glActiveTexture(GL_TEXTURE0);
if (init_shaders(ec) < 0) if (init_shaders(ec) < 0)
return -1; return -1;

Loading…
Cancel
Save