hi;
On 2011-10-14 at 15:59, norten shen wrote:
> We use clutter-1.6.2 in CE4100 platform and found a texture display
> very slow during it's first show up. According our debug, it seems
> blocked in cogl atlas rebuild. Because when there is certain amount of
> different size textures, cogl will automatically build them into one
> or several big size textures with powers 2 width and height.
the atlas resizing logic prefers to use FBOs because they yield the best
performance on various platforms. on some platforms, especially the ones
using the PowerVR drivers or similar, creating FBOs is a particularly
expesive operation. for this reason, there are three more fallbacks:
• glBlitFramebuffer
• glCopyTexSubImage2D
• glGetTexImage + glTexSubImage2D
the blit mode used by the Cogl atlas can be changed using the
COGL_ATLAS_DEFAULT_BLIT_MODE environment variable, using one of these
four values:
• texture-render
• framebuffer
• copy-tex-sub-image
• get-tex-data
the first one is the default.
my suggestion is that you use the other three modes and check if they
solve the issue for your particular platform.
> For better user experience, I think maybe we can collect certain mount
> of small pictures into one big atlas picture by paint tools, and we
> can load into clutter as one big texture, as i know if the picture
> width and height is powers 2, the loading will be quickly. But the
> problem is , i do not know how to use cogl or clutter APIs to get the
> sub-textures in a texture and bind it with an actor. Any help will be
> appreciate,
the Mx texture cache code has some code that you can look at:
https://github.com/clutter-project/mx/blob/master/mx/mx-texture-cache.c
or you could use Mx directly.
ciao,
Emmanuele.
--
Emmanuele Bassi,
Intel Open Source Technology Center
_______________________________________________
clutter-app-devel-list mailing list
[email protected]
http://lists.clutter-project.org/listinfo/clutter-app-devel-list