aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/classes/share/javax/media/j3d/Canvas3D.java5
-rw-r--r--src/classes/share/javax/media/j3d/ShaderBin.java6
-rw-r--r--src/classes/share/javax/media/j3d/TransparentRenderingInfo.java29
3 files changed, 22 insertions, 18 deletions
diff --git a/src/classes/share/javax/media/j3d/Canvas3D.java b/src/classes/share/javax/media/j3d/Canvas3D.java
index 8e928e8..39bb51f 100644
--- a/src/classes/share/javax/media/j3d/Canvas3D.java
+++ b/src/classes/share/javax/media/j3d/Canvas3D.java
@@ -4418,11 +4418,6 @@ public class Canvas3D extends Canvas {
stateUpdateMask &= ~(1 << bit);
}
- // mark that the current bin specified by the bit needs to be updated
- void setStateToUpdate(int bit) {
- stateUpdateMask |= 1 << bit;
- }
-
// mark that the bin specified by the bit needs to be updated
void setStateToUpdate(int bit, Object bin) {
stateUpdateMask |= 1 << bit;
diff --git a/src/classes/share/javax/media/j3d/ShaderBin.java b/src/classes/share/javax/media/j3d/ShaderBin.java
index a10080c..c2724fe 100644
--- a/src/classes/share/javax/media/j3d/ShaderBin.java
+++ b/src/classes/share/javax/media/j3d/ShaderBin.java
@@ -295,12 +295,6 @@ class ShaderBin implements ObjectUpdate {
tb = tb.next;
}
}
-
- void updateTransparentAttributes(Canvas3D cv) {
-
- // include this ShaderBin to the to-be-updated state set in canvas
- cv.setStateToUpdate(Canvas3D.SHADERBIN_BIT, this);
- }
void updateAttributes(Canvas3D cv) {
diff --git a/src/classes/share/javax/media/j3d/TransparentRenderingInfo.java b/src/classes/share/javax/media/j3d/TransparentRenderingInfo.java
index b9b06d9..a2a1e7d 100644
--- a/src/classes/share/javax/media/j3d/TransparentRenderingInfo.java
+++ b/src/classes/share/javax/media/j3d/TransparentRenderingInfo.java
@@ -71,10 +71,15 @@ class TransparentRenderingInfo extends Object implements com.sun.j3d.utils.scene
== View.VISIBILITY_DRAW_INVISIBLE && visible)) {
return false;
}
- attributeBin.environmentSet.lightBin.updateAttributes(cv);
- attributeBin.environmentSet.updateAttributes(cv);
- attributeBin.updateAttributes(cv);
- shaderBin.updateTransparentAttributes(cv);
+
+ // Fix to issue 314. Set the appropriate bits for the dirty bins
+ // and call the update state method.
+ cv.setStateToUpdate(Canvas3D.LIGHTBIN_BIT, attributeBin.environmentSet.lightBin);
+ cv.setStateToUpdate(Canvas3D.ENVIRONMENTSET_BIT, attributeBin.environmentSet);
+ cv.setStateToUpdate(Canvas3D.ATTRIBUTEBIN_BIT, attributeBin);
+ cv.setStateToUpdate(Canvas3D.SHADERBIN_BIT, shaderBin);
+ cv.updateEnvState();
+
} else if (cv.attributeBin != attributeBin) {
boolean visible = (attributeBin.definingRenderingAttributes == null ||
attributeBin.definingRenderingAttributes.visible);
@@ -85,10 +90,20 @@ class TransparentRenderingInfo extends Object implements com.sun.j3d.utils.scene
== View.VISIBILITY_DRAW_INVISIBLE && visible)) {
return false;
}
- attributeBin.updateAttributes(cv);
- shaderBin.updateTransparentAttributes(cv);
+
+ // Fix to issue 314. Set the appropriate bits for the dirty bins
+ // and call the update state method.
+ cv.setStateToUpdate(Canvas3D.ATTRIBUTEBIN_BIT, attributeBin);
+ cv.setStateToUpdate(Canvas3D.SHADERBIN_BIT, shaderBin);
+ cv.updateEnvState();
+
} else if (cv.shaderBin != shaderBin) {
- shaderBin.updateTransparentAttributes(cv);
+
+ // Fix to issue 314. Set the appropriate bits for the dirty bins
+ // and call the update state method.
+ cv.setStateToUpdate(Canvas3D.SHADERBIN_BIT, shaderBin);
+ cv.updateEnvState();
+
}
return true;