From 91e086b3c0631198405cf6303f547bae34697c96 Mon Sep 17 00:00:00 2001 From: phil Date: Wed, 7 Dec 2016 18:01:23 +1300 Subject: another capability check added to SimpleSahderAppearance auto build --- .../java/org/jogamp/java3d/utils/shader/SimpleShaderAppearance.java | 3 +++ 1 file changed, 3 insertions(+) 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; -- cgit v1.2.3