Przeglądaj źródła

fix crashes in several tests

Kirill Vainer 9 lat temu
rodzic
commit
52487041b4

+ 1 - 5
jme3-examples/src/main/java/jme3test/effect/TestEverything.java

@@ -123,11 +123,7 @@ public class TestEverything extends SimpleApplication {
 
     public void setupFloor(){
         Material mat = assetManager.loadMaterial("Textures/Terrain/BrickWall/BrickWall.j3m");
-        mat.getTextureParam("DiffuseMap").getTextureValue().setWrap(WrapMode.Repeat);
-        mat.getTextureParam("NormalMap").getTextureValue().setWrap(WrapMode.Repeat);
-        mat.getTextureParam("ParallaxMap").getTextureValue().setWrap(WrapMode.Repeat);
-        
-        Box floor = new Box(Vector3f.ZERO, 50, 1f, 50);
+        Box floor = new Box(50, 1f, 50);
         TangentBinormalGenerator.generate(floor);
         floor.scaleTextureCoordinates(new Vector2f(5, 5));
         Geometry floorGeom = new Geometry("Floor", floor);

+ 1 - 2
jme3-examples/src/main/java/jme3test/material/TestParallax.java

@@ -71,8 +71,7 @@ public class TestParallax extends SimpleApplication {
     Material mat;
 
     public void setupFloor() {
-        mat = assetManager.loadMaterial("Textures/Terrain/BrickWall/BrickWall2.j3m");
-        //mat = assetManager.loadMaterial("Textures/Terrain/BrickWall/BrickWall.j3m");
+        mat = assetManager.loadMaterial("Textures/Terrain/BrickWall/BrickWall.j3m");
                 
         Node floorGeom = new Node("floorGeom");
         Quad q = new Quad(100, 100);

+ 1 - 4
jme3-examples/src/main/java/jme3test/post/TestPostFilters.java

@@ -107,10 +107,7 @@ public class TestPostFilters extends SimpleApplication implements ActionListener
 
     public void setupFloor() {
         Material mat = assetManager.loadMaterial("Textures/Terrain/BrickWall/BrickWall.j3m");
-        mat.getTextureParam("DiffuseMap").getTextureValue().setWrap(WrapMode.Repeat);
-        mat.getTextureParam("NormalMap").getTextureValue().setWrap(WrapMode.Repeat);
-        mat.getTextureParam("ParallaxMap").getTextureValue().setWrap(WrapMode.Repeat);
-        Box floor = new Box(Vector3f.ZERO, 50, 1f, 50);
+        Box floor = new Box(50, 1f, 50);
         TangentBinormalGenerator.generate(floor);
         floor.scaleTextureCoordinates(new Vector2f(5, 5));
         Geometry floorGeom = new Geometry("Floor", floor);

+ 4 - 3
jme3-testdata/src/main/resources/Textures/Terrain/BrickWall/BrickWall.j3m

@@ -1,7 +1,8 @@
 Material Pong Rock : Common/MatDefs/Light/Lighting.j3md {
      MaterialParameters {
-         Shininess: 2.0
-         DiffuseMap : Repeat Textures/Terrain/BrickWall/BrickWall.jpg                  
-         ParallaxMap : Repeat Textures/Terrain/BrickWall/BrickWall_height.jpg
+         Shininess            : 2.0
+         DiffuseMap           : Repeat Textures/Terrain/BrickWall/BrickWall.dds
+         NormalMap            : Repeat Textures/Terrain/BrickWall/BrickWall_normal_parallax.dds
+         PackedNormalParallax : true
      }
 }

+ 0 - 8
jme3-testdata/src/main/resources/Textures/Terrain/BrickWall/BrickWall2.j3m

@@ -1,8 +0,0 @@
-Material Pong Rock : Common/MatDefs/Light/Lighting.j3md {
-     MaterialParameters {
-         Shininess: 2.0
-         DiffuseMap : Repeat Textures/Terrain/BrickWall/BrickWall.jpg
-         NormalMap : Repeat Textures/Terrain/BrickWall/BrickWall_normal_parallax.dds
-		 PackedNormalParallax: true
-     }
-}