aboutsummaryrefslogtreecommitdiffstats
path: root/src/classes
diff options
context:
space:
mode:
authorChien Yang <[email protected]>2007-04-26 21:51:17 +0000
committerChien Yang <[email protected]>2007-04-26 21:51:17 +0000
commit41f8a4f998ff5aec253461f6e03b28ccbb154c6b (patch)
tree9ffd1009f5d51408499166d6103901d025b48465 /src/classes
parent464c325bf738716a77af113b250cb87b1dc8b5d0 (diff)
Fixed Issue 314 : Issue with Stenciled Transparent Objects
git-svn-id: https://svn.java.net/svn/j3d-core~svn/trunk@831 ba19aa83-45c5-6ac9-afd3-db810772062c
Diffstat (limited to 'src/classes')
-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;