Browse Source

* 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

ShA..Rd 13 years ago
parent
commit
ac59c1ffdf

+ 1 - 0
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
         }

+ 1 - 0
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
         }

+ 1 - 1
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.
         }
     }
 

+ 5 - 1
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){

+ 1 - 1
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);