Great help - thanks, that clarifies the issue. best,
tomw On Mon, 2011-02-14 at 14:45 +0000, Robert Bragg wrote: > Hi, > > Mathijs is right; because your images are so large you are probably > exceeding your GPUs maximum texture size and so Clutter *tries* to > handle that by automatically splitting your texture into smaller > "slices" which your GPU can handle. The problem you are seeing is that > sliced textures have some limitations compared to regular, unsliced > textures because we have to make multiple draw calls per primitive to > draw each of the slices and one of the things we don't currently support > with sliced textures is multi-texturing. > > Multi-texturing is where you try to combine multiple textures when you > draw some primitive and this is done by added multiple layers to the > CoglMaterial being used to draw. > > It's very likely that you don't really need the full resolution of such > images and so you may be wasting a lot of memory by loading the full > images and also not using your GPU texture cache efficiently. > > If possible I would recommend that you load your images using the > gdk_pixbuf_loader API and in a "size-prepared" signal handler check the > image size and then if necessary call gdk_pixbuf_loader_set_size to > ensure that you don't load images larger than the largest size you plan > to display at. Once the image is loaded you can then give the data to > Clutter using clutter_texture_set_from_data (). Hopefully this way you > can avoid using sliced textures at all. > > At some point I think it would be good for Clutter to provide an > integrated image loading API that would simplify this kind of problem > since it does come up quite often. > > kind regards, > - Robert > > Excerpts from Mathijs Dumon's message of Sat Feb 12 11:11:22 +0000 2011: > > I think the error is related to the size of your jpg. Graphic cards can only > > store textures up to a certain maximum size (e.g. 256x256 px). If your > > texture/image is larger, it will be sliced into smaller subsets that fit > > into that maximum size (effectively making multiple textures in memory) > > > > I'm assuming the cogl back-end takes care of rendering these slices > > correctly one next to another. However due to the nature of the operation it > > is rather hard to do multi-texturing (because the other textures will be > > sliced differently if they have different sizes, and will only partly > > overlap with the other layers etc. etc.). > > > > So as long as you have defined just one texture for your actor (which > > usually is the case) there's no problem, when you'd like an actor to have > > one texture overlain by another it won't work with bigger textures. The > > exact size would be hardware-dependent. > > > > Again, this is what I think the error is about, please correct me if I'm > > wrong. > > > > best regards, > > Mathijs _______________________________________________ clutter-app-devel-list mailing list [email protected] http://lists.clutter-project.org/listinfo/clutter-app-devel-list
