The Shape.Texture expects a Texture, can we use a TextureRegion instead to use for filling? If so then I must have missed that document, any pointers to that one please.
Even louder squeak for changing the vertex points and uv coordinates for shapes so we can have a proper perspective textured filled polygons
WhiteTree Games - Home, home on the web, where the bits and bytes they do play! #MakeABetterGame! "Never give up, Never NEVER give up!" - Winston Churchill
@atilim, I have the same problem when using Meshes. Would it be possible to use textureregions for meshes, just like textures? (if somehow textureregion would be inherited from texturebase, that would solve the problem as well, mesh.settexture asks for a texturebase) i'm using a bunch of textures for the cards in a card-based game, but i need them to rotate in semi-3d, so i need to use meshes. so far all my pngs have to be in separate files, considering that i have them for multiple resolutions, it is a whole lot of pngs.
@keszegh It's hard to provide such functionality. But it's easy to use a texture atlas with meshes. Because you can specify the texture coordinates. Tomorrow, I'll post a simple example here.
thanks, i'm interested as in the ref manual i've only seen the option to retrieve texturesregions from a texturepack (and not textures), using TexturePack:getTextureRegion(texturename).
Hi @atilim, Thanks for your examples. But could you put it collected on one place like Github, so your examples wont spread all over the forum and makes people easier to find them.
@atilim, thanks a lot, i finally realized looking at your example, that there is this getregion function and together with the fact that a texturepack is inherited from texturebase, one can use textureregions as textures basically. although i can imagine that you could hide this trick behind gideros and if somebody tries to use a textureregion for the texture of a mesh then gideros would automatically do what your example does.
anyway, thanks, rendertotexture is next i hope..
@Nascode... indeed, i sweep the forums regularly just not to miss out the most useful snippets that might come handy later, a place where these are collected in a searchable/well-structured form would be nice.
Comments
Squeak, Squeak +1 for Shape.TextureRegion
Website: http://www.castlegateinteractive.com
https://play.google.com/store/apps/developer?id=Castlegate+Interactive
#MakeABetterGame! "Never give up, Never NEVER give up!" - Winston Churchill
http://www.nightspade.com
i'm using a bunch of textures for the cards in a card-based game, but i need them to rotate in semi-3d, so i need to use meshes. so far all my pngs have to be in separate files, considering that i have them for multiple resolutions, it is a whole lot of pngs.
Fragmenter - animated loop machine and IKONOMIKON - the memory game
Fragmenter - animated loop machine and IKONOMIKON - the memory game
Fragmenter - animated loop machine and IKONOMIKON - the memory game
Fragmenter - animated loop machine and IKONOMIKON - the memory game
hopefully more like http://www.imdb.com/title/tt0088763/ than http://www.imdb.com/title/tt0390384/
Fragmenter - animated loop machine and IKONOMIKON - the memory game
I've attached an example. Here it creates a mesh which uses a region of a texture pack. Also it works well with automatic image resolution.
Hope it helps.
Thanks for your examples. But could you put it collected on one place like Github, so your examples wont spread all over the forum and makes people easier to find them.
http://www.nightspade.com
anyway, thanks, rendertotexture is next i hope..
@Nascode... indeed, i sweep the forums regularly just not to miss out the most useful snippets that might come handy later, a place where these are collected in a searchable/well-structured form would be nice.
Fragmenter - animated loop machine and IKONOMIKON - the memory game