From 52487041b4f833061cdfa9d335f6741e91534f31 Mon Sep 17 00:00:00 2001 From: Kirill Vainer Date: Sun, 3 Apr 2016 16:42:11 -0400 Subject: [PATCH] fix crashes in several tests --- .../src/main/java/jme3test/effect/TestEverything.java | 6 +----- .../src/main/java/jme3test/material/TestParallax.java | 3 +-- .../src/main/java/jme3test/post/TestPostFilters.java | 5 +---- .../resources/Textures/Terrain/BrickWall/BrickWall.j3m | 7 ++++--- .../resources/Textures/Terrain/BrickWall/BrickWall2.j3m | 8 -------- 5 files changed, 7 insertions(+), 22 deletions(-) delete mode 100644 jme3-testdata/src/main/resources/Textures/Terrain/BrickWall/BrickWall2.j3m diff --git a/jme3-examples/src/main/java/jme3test/effect/TestEverything.java b/jme3-examples/src/main/java/jme3test/effect/TestEverything.java index 2aca26f5e..be05958c3 100644 --- a/jme3-examples/src/main/java/jme3test/effect/TestEverything.java +++ b/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); diff --git a/jme3-examples/src/main/java/jme3test/material/TestParallax.java b/jme3-examples/src/main/java/jme3test/material/TestParallax.java index f5af57f1f..cf5263ed2 100644 --- a/jme3-examples/src/main/java/jme3test/material/TestParallax.java +++ b/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); diff --git a/jme3-examples/src/main/java/jme3test/post/TestPostFilters.java b/jme3-examples/src/main/java/jme3test/post/TestPostFilters.java index 4ad419668..3ab2ae295 100644 --- a/jme3-examples/src/main/java/jme3test/post/TestPostFilters.java +++ b/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); diff --git a/jme3-testdata/src/main/resources/Textures/Terrain/BrickWall/BrickWall.j3m b/jme3-testdata/src/main/resources/Textures/Terrain/BrickWall/BrickWall.j3m index 41af10431..c35ab04c4 100644 --- a/jme3-testdata/src/main/resources/Textures/Terrain/BrickWall/BrickWall.j3m +++ b/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 } } \ No newline at end of file diff --git a/jme3-testdata/src/main/resources/Textures/Terrain/BrickWall/BrickWall2.j3m b/jme3-testdata/src/main/resources/Textures/Terrain/BrickWall/BrickWall2.j3m deleted file mode 100644 index 8f90a9454..000000000 --- a/jme3-testdata/src/main/resources/Textures/Terrain/BrickWall/BrickWall2.j3m +++ /dev/null @@ -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 - } -} \ No newline at end of file