fix crashes in several tests

This commit is contained in:
Kirill Vainer 2016-04-03 16:42:11 -04:00
parent 47c26ac0e4
commit 52487041b4
5 changed files with 7 additions and 22 deletions

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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
}
}

View File

@ -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
}
}