diff options
Diffstat (limited to 'src/classes')
-rw-r--r-- | src/classes/jogl/javax/media/j3d/JoglPipeline.java | 12 | ||||
-rw-r--r-- | src/classes/share/javax/media/j3d/Canvas3D.java | 97 | ||||
-rw-r--r-- | src/classes/share/javax/media/j3d/EventCatcher.java | 9 | ||||
-rw-r--r-- | src/classes/share/javax/media/j3d/NoopPipeline.java | 10 | ||||
-rw-r--r-- | src/classes/share/javax/media/j3d/Pipeline.java | 6 | ||||
-rw-r--r-- | src/classes/share/javax/media/j3d/Renderer.java | 2 |
6 files changed, 0 insertions, 136 deletions
diff --git a/src/classes/jogl/javax/media/j3d/JoglPipeline.java b/src/classes/jogl/javax/media/j3d/JoglPipeline.java index 60470ec..400b9c4 100644 --- a/src/classes/jogl/javax/media/j3d/JoglPipeline.java +++ b/src/classes/jogl/javax/media/j3d/JoglPipeline.java @@ -6424,18 +6424,6 @@ class JoglPipeline extends Pipeline { return 0; } - // notify D3D that Canvas is resize - int resizeD3DCanvas(Canvas3D cv, Context ctx) { - // Dummy method in JOGL pipeline - return 0; - } - - // notify D3D to toggle between FullScreen and window mode - int toggleFullScreenMode(Canvas3D cv, Context ctx) { - // Dummy method in JOGL pipeline - return 0; - } - // native method for setting Material when no material is present void updateMaterialColor(Context ctx, float r, float g, float b, float a) { if (VERBOSE) System.err.println("JoglPipeline.updateMaterialColor()"); diff --git a/src/classes/share/javax/media/j3d/Canvas3D.java b/src/classes/share/javax/media/j3d/Canvas3D.java index c34f4e9..205b9b1 100644 --- a/src/classes/share/javax/media/j3d/Canvas3D.java +++ b/src/classes/share/javax/media/j3d/Canvas3D.java @@ -785,9 +785,6 @@ ArrayList<Integer> textureIdResourceFreeList = new ArrayList<Integer>(); // each canvas has to build its own displayList. boolean needToRebuildDisplayList = false; - // Use by D3D when canvas resize/toggle in pure immediate mode - int reEvaluateCanvasCmd = 0; - // Read-only flag that indicates whether the following texture features // are supported for this canvas. @@ -2432,23 +2429,6 @@ ArrayList<TextureRetained> textureIDResourceTable = new ArrayList<TextureRetaine // Increment the elapsedFrame for the behavior structure // to trigger any interpolators view.universe.behaviorStructure.incElapsedFrames(); - // waitup user thread in PureImmediate mode to continue - if (reEvaluateCanvasCmd != 0) { - int status; - - antialiasingSet = false; - if (reEvaluateCanvasCmd == RESIZE) { - assert VirtualUniverse.mc.isD3D(); - status = resizeD3DCanvas(ctx); - } else { - status = toggleFullScreenMode(ctx); - } - // reset everything - if (status != NOCHANGE) { - resetImmediateRendering(status); - } - reEvaluateCanvasCmd = 0; - } graphicsContext3D.runMonitor(J3dThread.NOTIFY); } @@ -3898,11 +3878,6 @@ ArrayList<TextureRetained> textureIDResourceTable = new ArrayList<TextureRetaine } texUnitState[texUnitIndex].mirror = null; texUnitState[texUnitIndex].texture = null; - - if (VirtualUniverse.mc.isD3D()) { - texUnitState[texUnitIndex].texAttrs = null; - texUnitState[texUnitIndex].texGen = null; - } } @@ -3928,68 +3903,6 @@ ArrayList<TextureRetained> textureIDResourceTable = new ArrayList<TextureRetaine } } - - void d3dResize() { - assert VirtualUniverse.mc.isD3D(); - int status = resizeD3DCanvas(ctx); - - antialiasingSet = false; - - // We need to reevaluate everything since d3d may create - // a new ctx - if (status != NOCHANGE) { - resetRendering(status); - } - } - - void d3dToggle() { - assert VirtualUniverse.mc.isD3D(); - int status = toggleFullScreenMode(ctx); - - antialiasingSet = false; - if (status != NOCHANGE) { - resetRendering(status); - } - } - - // use by D3D only - void notifyD3DPeer(int cmd) { - assert VirtualUniverse.mc.isD3D(); - if (active) { - if (isRunning) { - if ((view != null) && - (view.active) && - // it is possible that view is set active by MC - // but renderer not yet set - (screen.renderer != null)) { - VirtualUniverse.mc.postRequest(MasterControl.STOP_RENDERER, this); - - while (isRunningStatus) { - MasterControl.threadYield(); - } - J3dMessage renderMessage = new J3dMessage(); - renderMessage.threads = J3dThread.RENDER_THREAD; - if (cmd == RESIZE) { - renderMessage.type = J3dMessage.RESIZE_CANVAS; - } else { - renderMessage.type = J3dMessage.TOGGLE_CANVAS; - } - renderMessage.universe = null; - renderMessage.view = null; - renderMessage.args[0] = this; - - screen.renderer.rendererStructure.addMessage(renderMessage); - VirtualUniverse.mc.postRequest(MasterControl.START_RENDERER, this); - VirtualUniverse.mc.sendRunMessage(view, - J3dThread.RENDER_THREAD); - } - } else { - // may be in immediate mode - reEvaluateCanvasCmd = cmd; - } - } - } - // reset all attributes so that everything e.g. display list, // texture will recreate again in the next frame void resetRendering(int status) { @@ -4934,16 +4847,6 @@ void addTextureResource(int id, TextureRetained obj) { return Pipeline.getPipeline().swapBuffers(this, ctx, dpy, drawable); } - // notify D3D that Canvas is resize - private int resizeD3DCanvas(Context ctx) { - return Pipeline.getPipeline().resizeD3DCanvas(this, ctx); - } - - // notify D3D to toggle between FullScreen and window mode - private int toggleFullScreenMode(Context ctx) { - return Pipeline.getPipeline().toggleFullScreenMode(this, ctx); - } - // ----------------------------------------------------------------------------- // native method for setting Material when no material is present diff --git a/src/classes/share/javax/media/j3d/EventCatcher.java b/src/classes/share/javax/media/j3d/EventCatcher.java index 017dd04..02340d9 100644 --- a/src/classes/share/javax/media/j3d/EventCatcher.java +++ b/src/classes/share/javax/media/j3d/EventCatcher.java @@ -178,9 +178,6 @@ class EventCatcher extends Object implements ComponentListener, FocusListener, System.err.println(e); } canvas.sendEventToBehaviorScheduler(e); - if (VirtualUniverse.mc.isD3D()) { - canvas.notifyD3DPeer(Canvas3D.RESIZE); - } canvas.evaluateVisiblilty(); canvas.redraw(); } @@ -245,12 +242,6 @@ class EventCatcher extends Object implements ComponentListener, FocusListener, public void keyPressed(KeyEvent e) { canvas.sendEventToBehaviorScheduler(e); - if (VirtualUniverse.mc.isD3D() && - e.isAltDown() && - (e.getKeyCode() == KeyEvent.VK_ENTER)) { - canvas.notifyD3DPeer(Canvas3D.TOGGLEFULLSCREEN); - } - if (DEBUG) { System.err.println(e); } diff --git a/src/classes/share/javax/media/j3d/NoopPipeline.java b/src/classes/share/javax/media/j3d/NoopPipeline.java index 1bd3059..b30cccd 100644 --- a/src/classes/share/javax/media/j3d/NoopPipeline.java +++ b/src/classes/share/javax/media/j3d/NoopPipeline.java @@ -1008,16 +1008,6 @@ class NoopPipeline extends Pipeline { return 0; } - // notify D3D that Canvas is resize - int resizeD3DCanvas(Canvas3D cv, Context ctx) { - return 0; - } - - // notify D3D to toggle between FullScreen and window mode - int toggleFullScreenMode(Canvas3D cv, Context ctx) { - return 0; - } - // native method for setting Material when no material is present void updateMaterialColor(Context ctx, float r, float g, float b, float a) { } diff --git a/src/classes/share/javax/media/j3d/Pipeline.java b/src/classes/share/javax/media/j3d/Pipeline.java index 5ca9caf..9abacdf 100644 --- a/src/classes/share/javax/media/j3d/Pipeline.java +++ b/src/classes/share/javax/media/j3d/Pipeline.java @@ -1008,12 +1008,6 @@ public Pipeline run() { // The native method for swapBuffers abstract int swapBuffers(Canvas3D cv, Context ctx, long dpy, Drawable drawable); - // notify D3D that Canvas is resize - abstract int resizeD3DCanvas(Canvas3D cv, Context ctx); - - // notify D3D to toggle between FullScreen and window mode - abstract int toggleFullScreenMode(Canvas3D cv, Context ctx); - // native method for setting Material when no material is present abstract void updateMaterialColor(Context ctx, float r, float g, float b, float a); diff --git a/src/classes/share/javax/media/j3d/Renderer.java b/src/classes/share/javax/media/j3d/Renderer.java index c387fed..8f77738 100644 --- a/src/classes/share/javax/media/j3d/Renderer.java +++ b/src/classes/share/javax/media/j3d/Renderer.java @@ -628,12 +628,10 @@ ArrayList<TextureRetained> textureIDResourceTable = new ArrayList<TextureRetaine } if (renderType == J3dMessage.RESIZE_CANVAS) { - canvas.d3dResize(); // render the image again after resize VirtualUniverse.mc.sendRunMessage(canvas.view, J3dThread.RENDER_THREAD); m[nmesg++].decRefcount(); } else if (renderType == J3dMessage.TOGGLE_CANVAS) { - canvas.d3dToggle(); VirtualUniverse.mc.sendRunMessage(canvas.view, J3dThread.RENDER_THREAD); m[nmesg++].decRefcount(); } else if (renderType == J3dMessage.RENDER_IMMEDIATE) { |