aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/classes/share/javax/media/j3d/GraphicsContext3D.java12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/classes/share/javax/media/j3d/GraphicsContext3D.java b/src/classes/share/javax/media/j3d/GraphicsContext3D.java
index b0919eb..4ee622f 100644
--- a/src/classes/share/javax/media/j3d/GraphicsContext3D.java
+++ b/src/classes/share/javax/media/j3d/GraphicsContext3D.java
@@ -2334,13 +2334,15 @@ public class GraphicsContext3D extends Object {
Point rasterSrcOffset = new Point();
ras.getSrcOffset(rasterSrcOffset);
- DepthComponentRetained depthComp = ras.depthComponent;
int depthType = 0;
Object depthBuffer = null;
- if(depthComp != null) {
- depthType = depthComp.type;
- depthBuffer = (depthType == DepthComponentRetained.DEPTH_COMPONENT_TYPE_FLOAT) ? floatBuffer : intBuffer;
- }
+ if (ras.depthComponent != null) {
+ depthType = ras.depthComponent.type;
+ if (depthType == DepthComponentRetained.DEPTH_COMPONENT_TYPE_FLOAT)
+ depthBuffer = floatBuffer;
+ else
+ depthBuffer = intBuffer;
+ }
int imageDataType = 0;
int imageFormatType = 0;