Hey

 

I want to use the boundary mode wrap on a box, but it does not seem to work…

Here’s the code, what am I doing wrong ?

 

 

           Appearance appearance = new Appearance();

           TextureLoader textureloader = new TextureLoader("test2.jpg", "RGB", this);

           Texture texture = textureloader.getTexture();

           //texture.setBoundaryModeS(Texture.WRAP);

           //texture.setBoundaryModeT(Texture.WRAP);

           TextureAttributes texAttr = new TextureAttributes();

           texAttr.setTextureMode(TextureAttributes.MODULATE);

           appearance.setTextureAttributes(texAttr);

           appearance.setTexture(texture);   

Box box = new Box(10.0f, 0.1f, 10.0f, Box.GENERATE_NORMALS | Box.GENERATE_TEXTURE_COORDS, appearance);

           box.getAppearance().getTexture().setBoundaryModeS(Texture.CLAMP);

           box.getAppearance().getTexture().setBoundaryModeT(Texture.CLAMP);

           objRoot.addChild(box);

 

Thanx

=========================================================================== 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".

<<image001.jpg>>

Reply via email to