[Cogl] cogl-pango API

Reza Ghassemi reza.robin1 at gmail.com
Fri Dec 13 19:10:03 PST 2013


Hi,

If I have two ClutterText actors at different depths and have depth testing
enabled, the text itself still draws only in the order the actors are added
to the stage, regardless of their depths.

Is this a known limitation due to how the cogl-pango API is implemented?
How hard would this be to fix?
I notice in cogl-pango-render.c in cogl_pango_show_layout:

 if (qdata->display_list == NULL)
    {
     ...
     ...
      pango_renderer_draw_layout (PANGO_RENDERER (priv), layout, 0, 0);
      priv->display_list = NULL;

      qdata->mipmapping_used = priv->use_mipmapping;
    }

  cogl_framebuffer_push_matrix (fb);
  cogl_framebuffer_translate (fb, x, y, 0);

  _cogl_pango_display_list_render (fb,
                                   qdata->display_list,
                                   color);

  cogl_framebuffer_pop_matrix (fb);

This looks like pango_renderer_draw_layout is drawing it to an offscreen
buffer then it is being drawn to the cogl framebuffer.  So why does it not
obey depth testing?


Thanks,
Reza
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/cogl/attachments/20131213/07c71c98/attachment.html>


More information about the Cogl mailing list