java - libgdx: Repeat a texture with offset like in HTML/CSS -
i want repeat texture texture should start offset rather 0,0 (uv). set
texture.setwrap(texture.texturewrap.repeat, texture.texturewrap.repeat);
and draw with
backgroundbatch.draw(texture, 0, 0, stage.getwidth(), stage.getheight(), 0, 0, 1, 1);
there 2 problems solution: first, texture skewed , i'm not seem able specify offset texture. screen cordinate should 0,0 texture uv should not start 0,0
i want same behaviour background-position in combination off background-repeat in css.
best way achieve using parrallaxlayer , parrallaxbackground classes
it optimised background operation u dont have worry performance
https://code.google.com/p/libgdx-users/wiki/parallaxbackgound
Comments
Post a Comment