From ac59c1ffdfaded295aabf37f5c37df053a5f472e Mon Sep 17 00:00:00 2001 From: "ShA..Rd" Date: Thu, 19 Apr 2012 02:25:10 +0000 Subject: [PATCH] * Fix link error in glow material techniques * DesktopAssetManager now works as before (flipY and generate mips options are enabled) * Fix crash in TestSimpleWater git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9322 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- engine/src/core-data/Common/MatDefs/Light/Lighting.j3md | 1 + engine/src/core-data/Common/MatDefs/Misc/Particle.j3md | 1 + engine/src/core-data/Common/MatDefs/Misc/Unshaded.j3md | 2 +- engine/src/core/com/jme3/asset/DesktopAssetManager.java | 6 +++++- engine/src/test/jme3test/water/TestSimpleWater.java | 2 +- 5 files changed, 9 insertions(+), 3 deletions(-) diff --git a/engine/src/core-data/Common/MatDefs/Light/Lighting.j3md b/engine/src/core-data/Common/MatDefs/Light/Lighting.j3md index 2aff43393..884ff8163 100644 --- a/engine/src/core-data/Common/MatDefs/Light/Lighting.j3md +++ b/engine/src/core-data/Common/MatDefs/Light/Lighting.j3md @@ -295,6 +295,7 @@ MaterialDef Phong Lighting { } Defines { + NEED_TEXCOORD1 HAS_GLOWMAP : GlowMap HAS_GLOWCOLOR : GlowColor } diff --git a/engine/src/core-data/Common/MatDefs/Misc/Particle.j3md b/engine/src/core-data/Common/MatDefs/Misc/Particle.j3md index 2607ea0a1..893b36391 100644 --- a/engine/src/core-data/Common/MatDefs/Misc/Particle.j3md +++ b/engine/src/core-data/Common/MatDefs/Misc/Particle.j3md @@ -102,6 +102,7 @@ MaterialDef Point Sprite { } Defines { + NEED_TEXCOORD1 HAS_GLOWMAP : GlowMap HAS_GLOWCOLOR : GlowColor } diff --git a/engine/src/core-data/Common/MatDefs/Misc/Unshaded.j3md b/engine/src/core-data/Common/MatDefs/Misc/Unshaded.j3md index 5a33d44f6..38c6df4e1 100644 --- a/engine/src/core-data/Common/MatDefs/Misc/Unshaded.j3md +++ b/engine/src/core-data/Common/MatDefs/Misc/Unshaded.j3md @@ -58,9 +58,9 @@ MaterialDef Unshaded { } Defines { + NEED_TEXCOORD1 HAS_GLOWMAP : GlowMap HAS_GLOWCOLOR : GlowColor - HAS_COLORMAP // Must be passed so that Unshaded.vert exports texCoord. } } diff --git a/engine/src/core/com/jme3/asset/DesktopAssetManager.java b/engine/src/core/com/jme3/asset/DesktopAssetManager.java index 870e9abe7..1d92e5552 100644 --- a/engine/src/core/com/jme3/asset/DesktopAssetManager.java +++ b/engine/src/core/com/jme3/asset/DesktopAssetManager.java @@ -350,7 +350,11 @@ public class DesktopAssetManager implements AssetManager { } public Texture loadTexture(String name){ - return loadTexture(new TextureKey(name, false)); + TextureKey key = new TextureKey(name, true); + key.setGenerateMips(true); + Texture tex = loadTexture(key); + System.out.println(tex + " - " + tex.getMinFilter()); + return tex; } public AudioData loadAudio(AudioKey key){ diff --git a/engine/src/test/jme3test/water/TestSimpleWater.java b/engine/src/test/jme3test/water/TestSimpleWater.java index de32923dd..2c977b8ce 100644 --- a/engine/src/test/jme3test/water/TestSimpleWater.java +++ b/engine/src/test/jme3test/water/TestSimpleWater.java @@ -81,7 +81,7 @@ public class TestSimpleWater extends SimpleApplication implements ActionListener //create water quad //waterPlane = waterProcessor.createWaterGeometry(100, 100); - waterPlane=(Spatial) assetManager.loadAsset("Models/WaterTest/WaterTest.mesh.xml"); + waterPlane=(Spatial) assetManager.loadModel("Models/WaterTest/WaterTest.mesh.xml"); waterPlane.setMaterial(waterProcessor.getMaterial()); waterPlane.setLocalScale(40); waterPlane.setLocalTranslation(-5, 0, 5);