compositor: Generate Framebuffer in the backends
authorBenjamin Franzke <benjaminfranzke@googlemail.com>
Fri, 18 Feb 2011 15:54:55 +0000 (16:54 +0100)
committerBenjamin Franzke <benjaminfranzke@googlemail.com>
Tue, 1 Mar 2011 15:21:01 +0000 (16:21 +0100)
compositor/compositor-drm.c
compositor/compositor-wayland.c
compositor/compositor-x11.c
compositor/compositor.c

index 806afc6..6f1ce70 100644 (file)
@@ -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;
index 1793089..fea189b 100644 (file)
@@ -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;
index 27b7cd9..afe7adc 100644 (file)
@@ -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;
index e3989d5..6b75447 100644 (file)
@@ -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;