diff --git a/clutter/clutter/clutter-stage-view.c b/clutter/clutter/clutter-stage-view.c index 1e9f98cfc..20ad2176e 100644 --- a/clutter/clutter/clutter-stage-view.c +++ b/clutter/clutter/clutter-stage-view.c @@ -314,12 +314,14 @@ create_offscreen_framebuffer (ClutterStageView *view, { ClutterStageViewPrivate *priv = clutter_stage_view_get_instance_private (view); + CoglPixelFormat format; CoglContext *cogl_context; CoglOffscreen *framebuffer; CoglTexture *texture; + format = cogl_framebuffer_get_internal_format (priv->framebuffer); cogl_context = cogl_framebuffer_get_context (priv->framebuffer); - texture = cogl_texture_2d_new_with_size (cogl_context, width, height); + texture = cogl_texture_2d_new_with_format (cogl_context, width, height, format); cogl_primitive_texture_set_auto_mipmap (texture, FALSE); if (!cogl_texture_allocate (texture, error)) diff --git a/cogl/cogl/cogl-framebuffer-private.h b/cogl/cogl/cogl-framebuffer-private.h index 00a53d1ea..32fff4b6a 100644 --- a/cogl/cogl/cogl-framebuffer-private.h +++ b/cogl/cogl/cogl-framebuffer-private.h @@ -146,9 +146,6 @@ void _cogl_framebuffer_set_internal_format (CoglFramebuffer *framebuffer, CoglPixelFormat internal_format); -CoglPixelFormat -cogl_framebuffer_get_internal_format (CoglFramebuffer *framebuffer); - void _cogl_framebuffer_clear_without_flush4f (CoglFramebuffer *framebuffer, unsigned long buffers, diff --git a/cogl/cogl/cogl-framebuffer.h b/cogl/cogl/cogl-framebuffer.h index 277ba3cc8..64bf8f4dc 100644 --- a/cogl/cogl/cogl-framebuffer.h +++ b/cogl/cogl/cogl-framebuffer.h @@ -1123,4 +1123,13 @@ cogl_framebuffer_flush (CoglFramebuffer *framebuffer); COGL_EXPORT CoglTimestampQuery * cogl_framebuffer_create_timestamp_query (CoglFramebuffer *framebuffer); + +/** + * cogl_framebuffer_get_internal_format: (skip) + * + * Returns the pixel format used internally by the framebuffer. + */ +COGL_EXPORT CoglPixelFormat +cogl_framebuffer_get_internal_format (CoglFramebuffer *framebuffer); + G_END_DECLS