Hi,
I can repeat a texture using a material, but is there way to do same for a gui window background / image?
Thanks
Repeated IGUIImage
Re: Repeated IGUIImage
Hm, not directly supported. You can get it somewhat to repeat itself by setting setScaleImage(true) and then using setSourceRect with a rectangle larger than the texture is. I think the rectangle kinda works like uv-coordinates. But it's probably not exactly what you want. I haven't experimented yet too much, so maybe playing around with those 2 functions somehow can give you that result.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Re: Repeated IGUIImage
Thanks, but I'm not finding "setSourceRect" or something similar in either IGUIImage or ITexture.
If this not available, would it be better to generate an image and use that or to instead use numerous IGUIImages using the original image tile?
If this not available, would it be better to generate an image and use that or to instead use numerous IGUIImages using the original image tile?
Re: Repeated IGUIImage
Oh, right, that one is new in IGUIImage (if you switch to Irrlicht trunk version from svn you get that).
Numerous IGUIImages - less memory, using a single texture with repeated images - maybe somewhat faster and less code to write.
Numerous IGUIImages - less memory, using a single texture with repeated images - maybe somewhat faster and less code to write.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm