diff options
-rw-r--r-- | src/main/java/org/jogamp/java3d/utils/shader/SimpleShaderAppearance.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/main/java/org/jogamp/java3d/utils/shader/SimpleShaderAppearance.java b/src/main/java/org/jogamp/java3d/utils/shader/SimpleShaderAppearance.java index a2f7f25..e5da160 100644 --- a/src/main/java/org/jogamp/java3d/utils/shader/SimpleShaderAppearance.java +++ b/src/main/java/org/jogamp/java3d/utils/shader/SimpleShaderAppearance.java @@ -382,6 +382,9 @@ public class SimpleShaderAppearance extends ShaderAppearance && (this.getPolygonAttributes() == null // no poly attributes || (!this.getPolygonAttributes().isLive() && !this.getPolygonAttributes().isCompiled()) // poly attributes are not yet live || this.getPolygonAttributes().getCapability(PolygonAttributes.ALLOW_MODE_READ))//poly attributes are live but can be read + + // finally we must be allowed to set the shader program while live + && ((!this.isLive() && !this.isCompiled()) || (this.getCapability(ALLOW_SHADER_PROGRAM_WRITE))) ) { boolean hasTexture = this.getTexture() != null || this.getTextureUnitCount() > 0; |