On Wed, 2008-10-15 at 09:17 +0200, Pe'ter, Csa'sza'r wrote: > I have a problem on "clipping" pango_clutter_render_layout() rendered > texts. I need to implement actors in a way they do not require open-gl > clipping since the app I am working on needs to run with Gles<2.0.
Clipping in Clutter works in two ways - either using clip planes or the stencil buffer. As far as I know, most GLES 1.0 implementations support clip planes so you might be able to just use the regular cogl_clip_set functions. Have you tried this? > I am thinking about rendering text onto a cogl-texture. After that I > could use cogl_texture_rectangle on it. (It would be even more > efficient for short constant texts.) Clutter doesn't yet support FBOs on GLES so it might be a bit tricky to do this unless, as you said, you reimplement the pango renderer. I did have a patch to make the pango renderer support rendering to a clipped rectangle. It worked by clipping each glyph against a rectangle and munging the coordinates if they spread outside the rectangle. So it didn't need clip planes or the stencil buffer to work. This was in bug #833 [1]. However we decided it wasn't necessary because we made the general clipping work better instead. Do you think this would be useful anyway? - Neil [1] http://bugzilla.openedhand.com/show_bug.cgi?id=833 -- To unsubscribe send a mail to [EMAIL PROTECTED]
