package jme3test.android;

import com.jme3.app.SimpleApplication;
import com.jme3.light.AmbientLight;
import com.jme3.light.PointLight;
import com.jme3.material.Material;
import com.jme3.math.ColorRGBA;
import com.jme3.math.Vector3f;
import com.jme3.scene.Geometry;
import com.jme3.scene.shape.Box;
import com.jme3.scene.shape.Sphere;
import com.jme3.util.TangentBinormalGenerator;

/**
 * Test case to look for images stored in the Android drawable and mipmap directories.
 *
 * @author iwgeric
 */
public class TestAndroidResources extends SimpleApplication {

    @Override
    public void simpleInitApp() {
        // Create boxes with textures that are stored in the Android Resources Folders
        // Images are stored in multiple Drawable and Mipmap directories.  Android picks the ones that
        // match the device size and density.
        Box box1Mesh = new Box(1, 1, 1);
        Geometry box1 = new Geometry("Monkey Box 1", box1Mesh);
        Material mat1 = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
        mat1.setTexture("ColorMap", assetManager.loadTexture("drawable_monkey.png"));
        box1.setMaterial(mat1);
        box1.setLocalTranslation(-2, 0, 0);
        rootNode.attachChild(box1);

        Box box2Mesh = new Box(1, 1, 1);
        Geometry box2 = new Geometry("Monkey Box 2", box2Mesh);
        Material mat2 = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
        mat2.setTexture("ColorMap", assetManager.loadTexture("mipmap_monkey.png"));
        box2.setMaterial(mat2);
        box2.setLocalTranslation(2, 0, 0);
        rootNode.attachChild(box2);

    }
}

@@ -466,16 +466,216 @@
 ctories.
+  Image files are%0A * stored in the main-%3Eres-%3Edrawable-xxxx directories and main-%3Eres-%3Emipmap-xxxx directories.  The Android OS%0A * will choose the best matching image based on the device capabilities.
 %0A *%0A * @

update doc