Daniel,
Actually I was rather thrilled with 1.2Beta1 as I finally got textures to WORK.
(I hadn't put much effort into it because I thought something was broken with
1.2Alpha).
A couple ideas for you to try to add to the code you listed:
app.setCapability(Appearance.ALLOW_TEXTURE_WRITE);
app.setCapability(Appearance.ALLOW_TEXTURE_ATTRIBUTES_WRITE);
and I load textures a bit different:
TextureLoader myLoader = new TextureLoader("testgras.jpg",frame);
ImageComponent2D myImage = myLoader.getImage();
Texture2D myTex = new Texture2D(Texture.BASE_LEVEL,Texture.RGB,128,128); // this
is KEY you can NOT use the default constructor "Texture2D()"
myTex.setEnable(true);
myTex.setBoundaryModeS(Texture.WRAP);
myTex.setBoundaryModeT(Texture.WRAP);
myTex.setImage(0,myImage);
- John Wright
Starfire Research
Daniel Selman wrote:
> All,
>
> This is the shortest piece of code I could find that no longer applies a
> texture to a Shape3D under 1.2B1:
>
> Appearance app = new Appearance();
>
> TextureLoader tex = new TextureLoader( "earth.jpg", this );
> app.setTexture( tex.getTexture() );
>
> Sphere sphere = new Sphere( 3, Primitive.GENERATE_NORMALS |
> Primitive.GENERATE_TEXTURE_COORDS, 32, app );
>
> Could someone from SUN please tell me how to get this working with 1.2B1?
> This ran fine with 1.1.2.
>
> Thanks,
>
> Daniel Selman
>
> [EMAIL PROTECTED]
> http://www.tornadolabs.com
>
> > -----Original Message-----
> > From: Discussion list for Java 3D API
> > [mailto:[EMAIL PROTECTED]]On Behalf Of John A. Tenney
> > Sent: 20 January 2000 06:16
> > To: [EMAIL PROTECTED]
> > Subject: Re: [JAVA3D] Java 3D API Version 1.2 Beta1: Maintenance Release
> > Implementation Now Available
> >
> >
> > And it is a great improvement! Much better performance and much
> > lower memory
> > leakage, as measured in my application.
> >
> > -----Original Message-----
> > From: Discussion list for Java 3D API
> > [mailto:[EMAIL PROTECTED]]On Behalf Of Rob Posadas
> > Sent: Wednesday, January 19, 2000 9:27 AM
> > To: [EMAIL PROTECTED]
> > Subject: [JAVA3D] Java 3D API Version 1.2 Beta1: Maintenance Release
> > Implementation Now Available
> >
> >
> > Java 3D API Version 1.2 Beta1: Maintenance Release Implementation Now
> > Available
> >
> > You can access it from:
> > http://java.sun.com/products/java-media/3D/index.html
> >
> >
> > Rob Posadas
> >
> > Manager, 3d Graphics Software
> > Sun Microsystems
> > [EMAIL PROTECTED]
> > (650) 786-7873
> >
> > ==================================================================
> > =========
> > 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".
> >
> > ==================================================================
> > =========
> > 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".
> >
>
> ===========================================================================
> 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".
===========================================================================
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".