Hi,
on by a piece of code with which I try to map a picture onto a sphere.
|Appearance headApp = new Appearance();
|
|String fileName = "/home/pravasio/Java3D/Demo/earth.jpg";
| Texture earthTex = new TextureLoader(fileName, (Applet) obs).getTexture();
| headApp.setTexture(earthTex);
| if (earthTex == null) {
| System.out.println("Warning: Texture is disabled");}
|
|Sphere head = new Sphere(scale, Sphere.GENERATE_NORMALS |
| Sphere.GENERATE_TEXTURE_COORDS, 80, headApp);
Material is set, the sphere gets later added to a TransformGroup, too, which in
turn is added to a BranchGroup.
The problem is that the texture just doesn't appear on the sphere.
Even though I have compared the code with the one available in the examples, I
just can't figure out where the problem is.
Could any body give me a hint what I have forgotten to do, please?
Thanks a lot
Cheers
Pamela
=====================================================================
To subscribe/unsubscribe, send mail to [EMAIL PROTECTED]
Java 3D Home Page: http://java.sun.com/products/java-media/3D/