diff options
author | Scott Barta <sbarta@google.com> | 2012-03-01 12:35:35 -0800 |
---|---|---|
committer | Scott Barta <sbarta@google.com> | 2012-03-01 12:40:08 -0800 |
commit | 59b2e6871c65f58fdad78cd7229c292f6a177578 (patch) | |
tree | 2d4e7bfc05b93f40b34675d77e403dd1c25efafd /engine/src/android/com/jme3/texture | |
parent | f9b30489e75ac1eabc365064959804e99534f7ab (diff) | |
download | jmonkeyengine-59b2e6871c65f58fdad78cd7229c292f6a177578.tar.gz |
Adds the jMonkeyEngine library to the build.
Adds the jMonkeyEngine open source 3D game engine to the build. This
is built as a static library and is only used by the Finsky client.
Change-Id: I06a3f054df7b8a67757267d884854f70c5a16ca0
Diffstat (limited to 'engine/src/android/com/jme3/texture')
-rw-r--r-- | engine/src/android/com/jme3/texture/plugins/AndroidImageLoader.java | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/engine/src/android/com/jme3/texture/plugins/AndroidImageLoader.java b/engine/src/android/com/jme3/texture/plugins/AndroidImageLoader.java new file mode 100644 index 0000000..17f850e --- /dev/null +++ b/engine/src/android/com/jme3/texture/plugins/AndroidImageLoader.java @@ -0,0 +1,20 @@ +package com.jme3.texture.plugins; + +import android.graphics.Bitmap; +import com.jme3.asset.AndroidImageInfo; +import com.jme3.asset.AssetInfo; +import com.jme3.asset.AssetLoader; +import com.jme3.texture.Image; +import java.io.IOException; + +public class AndroidImageLoader implements AssetLoader { + + public Object load(AssetInfo info) throws IOException { + AndroidImageInfo imageInfo = new AndroidImageInfo(info); + Bitmap bitmap = imageInfo.getBitmap(); + + Image image = new Image(imageInfo.getFormat(), bitmap.getWidth(), bitmap.getHeight(), null); + image.setEfficentData(imageInfo); + return image; + } +} |