public void initScene()
{
Light light = new Light();
light.ambient.setAll((short)64, (short)64, (short)64, (short)255);
light.position.setAll(3, 3, 3);
scene.lights().add(light);
_earth = new Sphere(1.2f, 15, 10);
scene.addChild(_earth);
Bitmap b = Utils.makeBitmapFromResourceId(BA.applicationContext, R.drawable.earth);
Shared.textureManager().addTextureId(b, "jupiter", false);
b.recycle();
b = Utils.makeBitmapFromResourceId(BA.applicationContext, R.drawable.clouds_alpha2b);
Shared.textureManager().addTextureId(b, "clouds", false);
b.recycle();
TextureVo t = new TextureVo("jupiter");
_earth.textures().add(t);
_cloudTexture = new TextureVo("clouds");
_cloudTexture.textureEnvs.get(0).param = GL10.GL_DECAL;
_cloudTexture.repeatU = true; // .. this is the default, but just to be explicit
_earth.textures().add(_cloudTexture);
_count = 0;
}
@Override
public void updateScene()
{
_earth.rotation().y += 1.0f;
// Animate texture offset
_cloudTexture.offsetU += 0.001f;
_count++;
}