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.

  1. make raw-assets folder inside android/assets folder , copy images there
  2. make pack folder inside android/assets folder
  3. 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);     } } 
  4. 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

Popular posts from this blog

how to insert data php javascript mysql with multiple array session 2 -

multithreading - Exception in Application constructor -

windows - CertCreateCertificateContext returns CRYPT_E_ASN1_BADTAG / 8009310b -