BlankI have a globe with a texture wrapped around it. While the creation of
the globe, it takes a long time
to load the texture. Is there anyway to speed up the loading of a texture. I
am currently have the code at the bottom of this message..
Thanks for your help.
- Zak
Code below:
--------------------------------------
public void buildObject() {
JFrame frame = new JFrame();
BaseAppearance sphereAppearance = new BaseAppearance();
TextureAttributes textureAttributes = new TextureAttributes();
Material sphereMaterial = new
Material(SceneColors.white,SceneColors.grey,SceneColors.white,SceneColors.wh
ite,20.0f);
TextureLoader loadedTexture = new TextureLoader(this.textureFilePath,new
String("RGB"),frame);
Texture sphereTexture = loadedTexture.getTexture();
sphereAppearance.setCapability(BaseAppearance.ALLOW_TEXTURE_WRITE);
sphereMaterial.setLightingEnable(true);
sphereAppearance.setMaterial(sphereMaterial);
sphereAppearance.setTexture(sphereTexture);
textureAttributes.setTextureMode(TextureAttributes.MODULATE);
sphereAppearance.setTextureAttributes(textureAttributes);
Sphere globe =
new Sphere(
this.radiusOfBody,
Sphere.GENERATE_NORMALS
| Sphere.GENERATE_TEXTURE_COORDS
| Sphere.ENABLE_APPEARANCE_MODIFY
| Sphere.ENABLE_GEOMETRY_PICKING,
80,
sphereAppearance);
globe.setCapability(GeometryArray.ALLOW_TEXCOORD_READ);
globe.setCapability(GeometryArray.ALLOW_TEXCOORD_WRITE);
globe.setAppearance(sphereAppearance);
this.addChild(globe);
}
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".