libgdx - texture packer doesn't create one huge image of images -
i'm following book libgdx , haven't comprehend texture atlases to. far understood, texture packer creates 1 huge image textures , atlas or pack file. when run it creates atlas/pack file , stores images 1 one. end same number of images stared with, therefore have done nothing. why happening? additional option needs checked, can create 1 huge file of images? used texture packer https://code.google.com/p/libgdx-texturepacker-gui/
i not use texture packer gui easier , faster pack textures source. if work eclipse, can following.
- make
raw-assetsfolder insideandroid/assetsfolder , copy images there - make
packfolder insideandroid/assetsfolder create new class on desktop project , copy code
public class texturesetup { static string input = "../android/assets/raw-assets"; static string output = "../android/assets/pack/"; static string atlas = "my-assets"; public static void main(string[] args){ texturepacker.process(input, output, atlas); } }run java app
if use gradle , texturepacker class not found, add gdx-tools build.gradle file.
project(":desktop") { apply plugin: "java" dependencies { compile project(":core") compile "com.badlogicgames.gdx:gdx-backend-lwjgl:$gdxversion" compile "com.badlogicgames.gdx:gdx-platform:$gdxversion:natives-desktop" compile "com.badlogicgames.gdx:gdx-tools:$gdxversion" } } refer official doc on texture packer more info , options https://github.com/libgdx/libgdx/wiki/texture-packer
Comments
Post a Comment