/** * This routine updates the mirror appearance for this appearance. * It also calls the update method for each node component if it * is not null. */ @Override synchronized void initMirrorObject() { // System.err.println("ShaderAppearanceRetained : initMirrorObject()"); super.initMirrorObject(); ShaderAppearanceRetained mirrorApp = (ShaderAppearanceRetained)mirror; if(shaderProgram != null) { mirrorApp.shaderProgram = (ShaderProgramRetained)shaderProgram.mirror; } else { mirrorApp.shaderProgram = null; } if(shaderAttributeSet != null) { mirrorApp.shaderAttributeSet = (ShaderAttributeSetRetained)shaderAttributeSet.mirror; } else { // System.err.println("shaderAttributeSet is null"); mirrorApp.shaderAttributeSet = null; } }
@Override synchronized void createMirrorObject() { if (mirror == null) { // we can't check isStatic() since it sub-NodeComponent // create a new one, we should create a // new AppearanceRetained() even though isStatic() = true. // For simplicity, always create a retained side. mirror = new AppearanceRetained(); } initMirrorObject(); }
if (k == 0) { // Do only first time appearance.setLive(inBackgroundGroup, s.refCount); appearance.initMirrorObject(); if (appearance.renderingAttributes != null) visible = appearance.renderingAttributes.visible;
synchronized(appearance.liveStateLock) { appearance.setLive(inBackgroundGroup, s.refCount); appearance.initMirrorObject(); if (appearance.renderingAttributes != null) visible = appearance.renderingAttributes.visible;