From 05dc1f19091382507bc3c2772cc624fc61f7aa3a Mon Sep 17 00:00:00 2001 From: "roo..li" Date: Fri, 24 Feb 2012 19:08:35 +0000 Subject: [PATCH] replaced deprecated ColoredTextured by Unshaded.j3md in sample git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9192 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- engine/src/test/jme3test/helloworld/HelloMaterial.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/engine/src/test/jme3test/helloworld/HelloMaterial.java b/engine/src/test/jme3test/helloworld/HelloMaterial.java index e930c9178..8ef6f5608 100644 --- a/engine/src/test/jme3test/helloworld/HelloMaterial.java +++ b/engine/src/test/jme3test/helloworld/HelloMaterial.java @@ -80,7 +80,7 @@ public class HelloMaterial extends SimpleApplication { /** A cube with its base color "leaking" through a partially transparent texture */ Box boxshape4 = new Box(new Vector3f(3f,-1f,0f), 1f,1f,1f); Geometry cube_leak = new Geometry("Leak-through color cube", boxshape4); - Material mat_tl = new Material(assetManager, "Common/MatDefs/Misc/ColoredTextured.j3md"); + Material mat_tl = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md"); mat_tl.setTexture("ColorMap", assetManager.loadTexture("Textures/ColoredTex/Monkey.png")); mat_tl.setColor("Color", new ColorRGBA(1f,0f,1f, 1f)); // purple cube_leak.setMaterial(mat_tl); @@ -103,6 +103,7 @@ public class HelloMaterial extends SimpleApplication { shiny_rock.setLocalTranslation(0,2,-2); // Move it a bit shiny_rock.rotate(1.6f, 0, 0); // Rotate it a bit rootNode.attachChild(shiny_rock); + /** Must add a light to make the lit object visible! */ DirectionalLight sun = new DirectionalLight(); sun.setDirection(new Vector3f(1,0,-2).normalizeLocal());