libGDX texture load problem

Started by
10 comments, last by Yago 10 years, 7 months ago

Quick question... why are you using a texture instead of TextureAtlas? If you are simply trying to do a sprite sheet, I recommend giving a TextureAtlas a quick try, then using the findRegion method to load in your texture regions...

There is a nice texturepacker available... https://code.google.com/p/libgdx-texturepacker-gui/'

Very easy to use, just point it at a folder and go. Then make AtlasRegions based off of name of texture and index. May need to rotate if it was rotated... [edit:easier when starting just not to let the packer pack it rotated, but it does make smaller files...]

Haven't ever tried that large of a texture, but I believe this is the recommended route by libgdx.

Anyway, it probably is a memory issue as mentioned. As the TextureAtlas can have many textures put together but easily accessed, I recommend giving it a try really quickly.

Seems that they recently moved to gethub, so not sure where the reference I was going to give about this was.

Advertisement


And also try loading the .TGA directly.

Also if you send me the image I can debug it to see what caused it to fail specifically.

Didn't make a difference. And I sent a message with the links to the files.


Quick question... why are you using a texture instead of TextureAtlas?

Because I didn't know about TextureAtlas before, and the player character's texture is pretty much the ONLY texture in the game at this stage. Hehe.

This topic is closed to new replies.

Advertisement