1. nope, it's not working. You need two different appearances. The shape object is NOT making a copy of the appearance object, but it's using it's reference. So when you change the texture unit state for the second shape it will also change it for the first shape, since they share the same appearance object.
2. that one is correct. Cheers, Florin -----Urspr�ngliche Nachricht----- Von: Lan Wu-Cavener [mailto:[EMAIL PROTECTED]] Gesendet: Donnerstag, 20. Februar 2003 20:11 An: [EMAIL PROTECTED] Betreff: [JAVA3D] simple questions -TextureUnitState and Appearance Hi, everyone: Question 1: I have multiple Shape3D objects, say shape1, shape2, sharing an Appearance object: appearance. The Appearance object contains a TextureUnitState[2] witch is set differently for shape1 and shape2. I would like to confirm this should work. For instance, the following code will display texture1 for shape1 and texture2 for shape2,respectively. textureUnitState[0].setTexture(texture1); textureUnitState[1].setTexture(null); appearance.setTextureUnitState(textureUnitState); shape1.setAppearance(appearance); textureUnitState[0].setTexture(null); textureUnitState[1].setTexture(texture2); appearance.setTextureUnitState(textureUnitState); shape2.setAppearance(appearance); Question 2: Can different Appearance object share one TextureUnitState[] object? say if I have created a textureUnitState[2], would the following code be wrong? for (int i=0; i<4; i++) appearance[i].setTextureUnitState(textureUnitState); I know these are basic conceptual questions. I am too frustrated to think through. Thanks for any help from you! Lan Lan Wu-Cavener Dept. of Landscape Architecture =========================================================================== 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".
