OSDN Git Service

Update more tests
authorXoppa <contact@xoppa.nl>
Sat, 28 Sep 2013 17:38:14 +0000 (19:38 +0200)
committerXoppa <contact@xoppa.nl>
Sat, 28 Sep 2013 17:38:14 +0000 (19:38 +0200)
tests/gdx-tests/src/com/badlogic/gdx/tests/g3d/Basic3DTest.java
tests/gdx-tests/src/com/badlogic/gdx/tests/g3d/SkeletonTest.java

index fccaf2c..dca8ac2 100644 (file)
@@ -9,11 +9,11 @@ import com.badlogic.gdx.graphics.VertexAttributes.Usage;
 import com.badlogic.gdx.graphics.g3d.Model;
 import com.badlogic.gdx.graphics.g3d.ModelBatch;
 import com.badlogic.gdx.graphics.g3d.ModelInstance;
-import com.badlogic.gdx.graphics.g3d.lights.DirectionalLight;
-import com.badlogic.gdx.graphics.g3d.lights.Lights;
+import com.badlogic.gdx.graphics.g3d.environment.DirectionalLight;
+import com.badlogic.gdx.graphics.g3d.environment.Environment;
 import com.badlogic.gdx.graphics.g3d.loader.G3dModelLoader;
-import com.badlogic.gdx.graphics.g3d.materials.ColorAttribute;
-import com.badlogic.gdx.graphics.g3d.materials.Material;
+import com.badlogic.gdx.graphics.g3d.attributes.ColorAttribute;
+import com.badlogic.gdx.graphics.g3d.Material;
 import com.badlogic.gdx.graphics.g3d.utils.CameraInputController;
 import com.badlogic.gdx.graphics.g3d.utils.DefaultShaderProvider;
 import com.badlogic.gdx.graphics.g3d.utils.ModelBuilder;
@@ -26,15 +26,15 @@ public class Basic3DTest extends GdxTest {
        public ModelBatch modelBatch;
        public Model model;
        public ModelInstance instance;
-       public Lights lights;
+       public Environment environment;
        
        @Override
        public void create () {
                modelBatch = new ModelBatch(new DefaultShaderProvider());
 //             modelBatch = new ModelBatch();
-               lights = new Lights();
-               lights.ambientLight.set(0.4f, 0.4f, 0.4f, 1f);
-               lights.add(new DirectionalLight().set(0.8f, 0.8f, 0.8f, -1f, -0.8f, -0.2f));
+               environment = new Environment();
+               environment.set(new ColorAttribute(ColorAttribute.AmbientLight, .4f, .4f, .4f, 1f));
+               environment.add(new DirectionalLight().set(0.8f, 0.8f, 0.8f, -1f, -0.8f, -0.2f));
                
                cam = new PerspectiveCamera(67, Gdx.graphics.getWidth(), Gdx.graphics.getHeight());
                cam.position.set(10f, 10f, 10f);
@@ -61,7 +61,7 @@ public class Basic3DTest extends GdxTest {
                Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT);
 
                modelBatch.begin(cam);
-               modelBatch.render(instance, lights);
+               modelBatch.render(instance, environment);
                modelBatch.end();
        }
        
index eae61a8..c2119e1 100644 (file)
@@ -7,7 +7,7 @@ import com.badlogic.gdx.graphics.GL10;
 import com.badlogic.gdx.graphics.g3d.Model;
 import com.badlogic.gdx.graphics.g3d.ModelBatch;
 import com.badlogic.gdx.graphics.g3d.ModelInstance;
-import com.badlogic.gdx.graphics.g3d.materials.BlendingAttribute;
+import com.badlogic.gdx.graphics.g3d.attributes.BlendingAttribute;
 import com.badlogic.gdx.graphics.g3d.model.Animation;
 import com.badlogic.gdx.graphics.g3d.model.Node;
 import com.badlogic.gdx.graphics.g3d.model.NodeAnimation;