diff options
author | Harvey Harrison <[email protected]> | 2012-08-24 16:08:33 -0700 |
---|---|---|
committer | Harvey Harrison <[email protected]> | 2012-08-24 16:08:33 -0700 |
commit | 0d09c09346dff6c51456306018e6fc64b2993ecb (patch) | |
tree | 232f5b2fdf982f53461e6c636f4dedc2889ec379 /src | |
parent | d61e30036519d171de2caccc0b1a3950c57f3388 (diff) |
j3dcore: remove the displayID from screen as all remaining pipelines ignore it
Signed-off-by: Harvey Harrison <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/classes/share/javax/media/j3d/Canvas3D.java | 52 | ||||
-rw-r--r-- | src/classes/share/javax/media/j3d/JoglPipeline.java | 22 | ||||
-rw-r--r-- | src/classes/share/javax/media/j3d/MasterControl.java | 2 | ||||
-rw-r--r-- | src/classes/share/javax/media/j3d/NoopPipeline.java | 19 | ||||
-rw-r--r-- | src/classes/share/javax/media/j3d/Pipeline.java | 17 | ||||
-rw-r--r-- | src/classes/share/javax/media/j3d/Renderer.java | 36 | ||||
-rw-r--r-- | src/classes/share/javax/media/j3d/Screen3D.java | 7 |
7 files changed, 64 insertions, 91 deletions
diff --git a/src/classes/share/javax/media/j3d/Canvas3D.java b/src/classes/share/javax/media/j3d/Canvas3D.java index c09235d..1ffd891 100644 --- a/src/classes/share/javax/media/j3d/Canvas3D.java +++ b/src/classes/share/javax/media/j3d/Canvas3D.java @@ -2382,7 +2382,7 @@ ArrayList<TextureRetained> textureIDResourceTable = new ArrayList<TextureRetaine return; } this.syncRender(ctx, true); - int status = swapBuffers(ctx, screen.display, drawable); + int status = swapBuffers(ctx, drawable); if (status != NOCHANGE) { resetImmediateRendering(status); } @@ -2404,7 +2404,7 @@ ArrayList<TextureRetained> textureIDResourceTable = new ArrayList<TextureRetaine * Wrapper for native createNewContext method. */ Context createNewContext(Context shareCtx, boolean isSharedCtx) { - Context retVal = createNewContext(this.screen.display, + Context retVal = createNewContext( this.drawable, shareCtx, isSharedCtx, this.offScreen); @@ -2418,24 +2418,24 @@ ArrayList<TextureRetained> textureIDResourceTable = new ArrayList<TextureRetaine * Make the context associated with the specified canvas current. */ final void makeCtxCurrent() { - makeCtxCurrent(ctx, screen.display, drawable); + makeCtxCurrent(ctx, drawable); } /** * Make the specified context current. */ final void makeCtxCurrent(Context ctx) { - makeCtxCurrent(ctx, screen.display, drawable); + makeCtxCurrent(ctx, drawable); } - final void makeCtxCurrent(Context ctx, long dpy, Drawable drawable) { + final void makeCtxCurrent(Context ctx, Drawable drawable) { if (ctx != screen.renderer.currentCtx || drawable != screen.renderer.currentDrawable) { if (!drawingSurfaceObject.isLocked()) { drawingSurfaceObject.renderLock(); - useCtx(ctx, dpy, drawable); + useCtx(ctx, drawable); drawingSurfaceObject.unLock(); } else { - useCtx(ctx, dpy, drawable); + useCtx(ctx, drawable); } screen.renderer.currentCtx = ctx; screen.renderer.currentDrawable = drawable; @@ -2450,7 +2450,7 @@ ArrayList<TextureRetained> textureIDResourceTable = new ArrayList<TextureRetaine if (needLock) { drawingSurfaceObject.renderLock(); } - if (releaseCtx(screen.renderer.currentCtx, screen.display)) { + if (releaseCtx(screen.renderer.currentCtx)) { screen.renderer.currentCtx = null; screen.renderer.currentDrawable = null; } @@ -3631,7 +3631,7 @@ ArrayList<TextureRetained> textureIDResourceTable = new ArrayList<TextureRetaine // extensions, the context will destroy immediately // inside the native code after setting the various // fields in this object - createQueryContext(screen.display, drawable, offScreen, 1, 1); + createQueryContext(drawable, offScreen, 1, 1); // compute the max available texture units maxAvailableTextureUnits = Math.max(maxTextureUnits, maxTextureImageUnits); } @@ -4257,7 +4257,7 @@ ArrayList<TextureRetained> textureIDResourceTable = new ArrayList<TextureRetaine (ctx != null)) { VirtualUniverse.mc.postRequest(MasterControl.FREE_CONTEXT, new Object[]{this, - new Long(screen.display), + Long.valueOf(0L), drawable, ctx}); // Fix for Issue 19 @@ -4767,29 +4767,29 @@ void addTextureResource(int id, TextureRetained obj) { // ***************************************************************** // This is the native method for creating the underlying graphics context. - private Context createNewContext(long display, Drawable drawable, + private Context createNewContext(Drawable drawable, Context shareCtx, boolean isSharedCtx, boolean offScreen) { - return Pipeline.getPipeline().createNewContext(this, display, drawable, + return Pipeline.getPipeline().createNewContext(this, drawable, shareCtx, isSharedCtx, offScreen); } - private void createQueryContext(long display, Drawable drawable, + private void createQueryContext(Drawable drawable, boolean offScreen, int width, int height) { - Pipeline.getPipeline().createQueryContext(this, display, drawable, + Pipeline.getPipeline().createQueryContext(this, drawable, offScreen, width, height); } // This is the native for creating offscreen buffer - Drawable createOffScreenBuffer(Context ctx, long display, int width, int height) { + Drawable createOffScreenBuffer(Context ctx, int width, int height) { return Pipeline.getPipeline().createOffScreenBuffer(this, - ctx, display, width, height); + ctx, width, height); } - void destroyOffScreenBuffer(Context ctx, long display, Drawable drawable) { + void destroyOffScreenBuffer(Context ctx, Drawable drawable) { assert drawable != null; - Pipeline.getPipeline().destroyOffScreenBuffer(this, ctx, display, drawable); + Pipeline.getPipeline().destroyOffScreenBuffer(this, ctx, drawable); } // This is the native for reading the image from the offscreen buffer @@ -4798,8 +4798,8 @@ void addTextureResource(int id, TextureRetained obj) { } // The native method for swapBuffers - int swapBuffers(Context ctx, long dpy, Drawable drawable) { - return Pipeline.getPipeline().swapBuffers(this, ctx, dpy, drawable); + int swapBuffers(Context ctx, Drawable drawable) { + return Pipeline.getPipeline().swapBuffers(this, ctx, drawable); } // ----------------------------------------------------------------------------- @@ -4809,8 +4809,8 @@ void addTextureResource(int id, TextureRetained obj) { Pipeline.getPipeline().updateMaterialColor(ctx, r, g, b, a); } - static void destroyContext(long display, Drawable drawable, Context ctx) { - Pipeline.getPipeline().destroyContext(display, drawable, ctx); + static void destroyContext(Drawable drawable, Context ctx) { + Pipeline.getPipeline().destroyContext(drawable, ctx); } // This is the native method for doing accumulation. @@ -4986,14 +4986,14 @@ void addTextureResource(int id, TextureRetained obj) { } // The native method that sets this ctx to be the current one - static boolean useCtx(Context ctx, long display, Drawable drawable) { - return Pipeline.getPipeline().useCtx(ctx, display, drawable); + static boolean useCtx(Context ctx, Drawable drawable) { + return Pipeline.getPipeline().useCtx(ctx, drawable); } // Give the Pipeline a chance to release the context. The return // value indicates whether the context was released. - private boolean releaseCtx(Context ctx, long dpy) { - return Pipeline.getPipeline().releaseCtx(ctx, dpy); + private boolean releaseCtx(Context ctx) { + return Pipeline.getPipeline().releaseCtx(ctx); } void clear(Context ctx, float r, float g, float b, boolean clearStencil) { diff --git a/src/classes/share/javax/media/j3d/JoglPipeline.java b/src/classes/share/javax/media/j3d/JoglPipeline.java index ff2be70..2df5c52 100644 --- a/src/classes/share/javax/media/j3d/JoglPipeline.java +++ b/src/classes/share/javax/media/j3d/JoglPipeline.java @@ -6168,7 +6168,7 @@ class JoglPipeline extends Pipeline { // // This is the native method for creating the underlying graphics context. - Context createNewContext(Canvas3D cv, long display, Drawable drawable, + Context createNewContext(Canvas3D cv, Drawable drawable, Context shareCtx, boolean isSharedCtx, boolean offScreen) { if (VERBOSE) System.err.println("JoglPipeline.createNewContext()"); @@ -6258,7 +6258,7 @@ class JoglPipeline extends Pipeline { return GLProfile.getMaxFixedFunc(true); } - void createQueryContext(Canvas3D cv, long display, Drawable drawable, + void createQueryContext(Canvas3D cv, Drawable drawable, boolean offScreen, int width, int height) { if (VERBOSE) System.err.println("JoglPipeline.createQueryContext()"); @@ -6302,7 +6302,7 @@ class JoglPipeline extends Pipeline { } // This is the native for creating an offscreen buffer - Drawable createOffScreenBuffer(Canvas3D cv, Context ctx, long display, int width, int height) { + Drawable createOffScreenBuffer(Canvas3D cv, Context ctx, int width, int height) { if (VERBOSE) System.err.println("JoglPipeline.createOffScreenBuffer()"); // Note 1: when this is called, the incoming Context argument is @@ -6326,7 +6326,7 @@ class JoglPipeline extends Pipeline { return new JoglDrawable(pbuffer); } - void destroyOffScreenBuffer(Canvas3D cv, Context ctx, long display, Drawable drawable) { + void destroyOffScreenBuffer(Canvas3D cv, Context ctx, Drawable drawable) { if (VERBOSE) System.err.println("JoglPipeline.destroyOffScreenBuffer()"); JoglDrawable jdraw = (JoglDrawable) drawable; @@ -6433,7 +6433,7 @@ class JoglPipeline extends Pipeline { } // The native method for swapBuffers - int swapBuffers(Canvas3D cv, Context ctx, long dpy, Drawable drawable) { + int swapBuffers(Canvas3D cv, Context ctx, Drawable drawable) { if (VERBOSE) System.err.println("JoglPipeline.swapBuffers()"); GLDrawable draw = drawable(drawable); draw.swapBuffers(); @@ -6449,7 +6449,7 @@ class JoglPipeline extends Pipeline { gl.glDisable(GL2.GL_LIGHTING); } - void destroyContext(long display, Drawable drawable, Context ctx) { + void destroyContext(Drawable drawable, Context ctx) { if (VERBOSE) System.err.println("JoglPipeline.destroyContext()"); GLDrawable draw = drawable(drawable); GLContext context = context(ctx); @@ -6872,7 +6872,7 @@ class JoglPipeline extends Pipeline { } // The native method that sets this ctx to be the current one - boolean useCtx(Context ctx, long display, Drawable drawable) { + boolean useCtx(Context ctx, Drawable drawable) { if (VERBOSE) System.err.println("JoglPipeline.useCtx()"); GLContext context = context(ctx); int res = context.makeCurrent(); @@ -6880,7 +6880,7 @@ class JoglPipeline extends Pipeline { } // Optionally release the context. Returns true if the context was released. - boolean releaseCtx(Context ctx, long dpy) { + boolean releaseCtx(Context ctx) { if (VERBOSE) System.err.println("JoglPipeline.releaseCtx()"); GLContext context = context(ctx); context.release(); @@ -8129,12 +8129,6 @@ class JoglPipeline extends Pipeline { caps.getAccumBlueBits() > 0); } - // Methods to get native WS display and screen - long getDisplay() { - if (VERBOSE) System.err.println("JoglPipeline.getDisplay()"); - return 0L; // Dummy method in JOGL - } - private boolean checkedForGetScreenMethod = false; private Method getScreenMethod = null; int getScreen(final GraphicsDevice graphicsDevice) { diff --git a/src/classes/share/javax/media/j3d/MasterControl.java b/src/classes/share/javax/media/j3d/MasterControl.java index 654fdd6..b4ea7fd 100644 --- a/src/classes/share/javax/media/j3d/MasterControl.java +++ b/src/classes/share/javax/media/j3d/MasterControl.java @@ -2860,7 +2860,7 @@ private static String getProperty(final String prop) { createMessage.view = null; createMessage.args[0] = c; // Fix for issue 340: send display, drawable & ctx in msg - createMessage.args[1] = new Long(c.screen.display); + createMessage.args[1] = Long.valueOf(0L); createMessage.args[2] = c.drawable; createMessage.args[3] = c.ctx; rdr.rendererStructure.addMessage(createMessage); diff --git a/src/classes/share/javax/media/j3d/NoopPipeline.java b/src/classes/share/javax/media/j3d/NoopPipeline.java index 63a3b3d..21348f3 100644 --- a/src/classes/share/javax/media/j3d/NoopPipeline.java +++ b/src/classes/share/javax/media/j3d/NoopPipeline.java @@ -951,22 +951,22 @@ class NoopPipeline extends Pipeline { // // This is the native method for creating the underlying graphics context. - Context createNewContext(Canvas3D cv, long display, Drawable drawable, + Context createNewContext(Canvas3D cv, Drawable drawable, Context shareCtx, boolean isSharedCtx, boolean offScreen) { return new NoopContext(); } - void createQueryContext(Canvas3D cv, long display, Drawable drawable, + void createQueryContext(Canvas3D cv, Drawable drawable, boolean offScreen, int width, int height) { } // This is the native for creating offscreen buffer - Drawable createOffScreenBuffer(Canvas3D cv, Context ctx, long display, int width, int height) { + Drawable createOffScreenBuffer(Canvas3D cv, Context ctx, int width, int height) { return null; } - void destroyOffScreenBuffer(Canvas3D cv, Context ctx, long display, Drawable drawable) { + void destroyOffScreenBuffer(Canvas3D cv, Context ctx, Drawable drawable) { } // This is the native for reading the image from the offscreen buffer @@ -974,7 +974,7 @@ class NoopPipeline extends Pipeline { } // The native method for swapBuffers - int swapBuffers(Canvas3D cv, Context ctx, long dpy, Drawable drawable) { + int swapBuffers(Canvas3D cv, Context ctx, Drawable drawable) { return 0; } @@ -982,7 +982,7 @@ class NoopPipeline extends Pipeline { void updateMaterialColor(Context ctx, float r, float g, float b, float a) { } - void destroyContext(long display, Drawable drawable, Context ctx) { + void destroyContext(Drawable drawable, Context ctx) { } // This is the native method for doing accumulation. @@ -1123,7 +1123,7 @@ class NoopPipeline extends Pipeline { } // The native method that sets this ctx to be the current one - boolean useCtx(Context ctx, long display, Drawable drawable) { + boolean useCtx(Context ctx, Drawable drawable) { return true; } @@ -1263,11 +1263,6 @@ class NoopPipeline extends Pipeline { return false; } - // Methods to get native WS display and screen - long getDisplay() { - return 0L; - } - int getScreen(GraphicsDevice graphicsDevice) { return 0; } diff --git a/src/classes/share/javax/media/j3d/Pipeline.java b/src/classes/share/javax/media/j3d/Pipeline.java index 779575f..9c9e5ea 100644 --- a/src/classes/share/javax/media/j3d/Pipeline.java +++ b/src/classes/share/javax/media/j3d/Pipeline.java @@ -964,28 +964,28 @@ public Pipeline run() { // // This is the native method for creating the underlying graphics context. - abstract Context createNewContext(Canvas3D cv, long display, Drawable drawable, + abstract Context createNewContext(Canvas3D cv, Drawable drawable, Context shareCtx, boolean isSharedCtx, boolean offScreen); - abstract void createQueryContext(Canvas3D cv, long display, Drawable drawable, + abstract void createQueryContext(Canvas3D cv, Drawable drawable, boolean offScreen, int width, int height); // This is the native for creating offscreen buffer - abstract Drawable createOffScreenBuffer(Canvas3D cv, Context ctx, long display, int width, int height); + abstract Drawable createOffScreenBuffer(Canvas3D cv, Context ctx, int width, int height); - abstract void destroyOffScreenBuffer(Canvas3D cv, Context ctx, long display, Drawable drawable); + abstract void destroyOffScreenBuffer(Canvas3D cv, Context ctx, Drawable drawable); // This is the native for reading the image from the offscreen buffer abstract void readOffScreenBuffer(Canvas3D cv, Context ctx, int format, int type, Object data, int width, int height); // The native method for swapBuffers - abstract int swapBuffers(Canvas3D cv, Context ctx, long dpy, Drawable drawable); + abstract int swapBuffers(Canvas3D cv, Context ctx, Drawable drawable); // native method for setting Material when no material is present abstract void updateMaterialColor(Context ctx, float r, float g, float b, float a); - abstract void destroyContext(long display, Drawable drawable, Context ctx); + abstract void destroyContext(Drawable drawable, Context ctx); // This is the native method for doing accumulation. abstract void accum(Context ctx, float value); @@ -1092,11 +1092,11 @@ public Pipeline run() { abstract void syncRender(Context ctx, boolean wait); // The native method that sets this ctx to be the current one - abstract boolean useCtx(Context ctx, long display, Drawable drawable); + abstract boolean useCtx(Context ctx, Drawable drawable); // Optionally release the context. A pipeline may override this and // returns true if the context was released. - boolean releaseCtx(Context ctx, long dpy) { + boolean releaseCtx(Context ctx) { return false; } @@ -1183,7 +1183,6 @@ public Pipeline run() { abstract boolean hasSceneAntialiasingAccum(Canvas3D cv); // Methods to get native WS display and screen - abstract long getDisplay(); abstract int getScreen(GraphicsDevice graphicsDevice); diff --git a/src/classes/share/javax/media/j3d/Renderer.java b/src/classes/share/javax/media/j3d/Renderer.java index 5cf89d4..a5077df 100644 --- a/src/classes/share/javax/media/j3d/Renderer.java +++ b/src/classes/share/javax/media/j3d/Renderer.java @@ -99,7 +99,6 @@ class Renderer extends J3dThread { long sharedCtxTimeStamp = 0; // display and drawable, used to free shared context - private long sharedCtxDisplay = 0; private Drawable sharedCtxDrawable = null; /** @@ -258,7 +257,6 @@ ArrayList<TextureRetained> textureIDResourceTable = new ArrayList<TextureRetaine cv.makeCtxCurrent(); cv.syncRender(cv.ctx, true); status = cv.swapBuffers(cv.ctx, - cv.screen.display, cv.drawable); if (status != Canvas3D.NOCHANGE) { cv.resetRendering(status); @@ -269,7 +267,6 @@ ArrayList<TextureRetained> textureIDResourceTable = new ArrayList<TextureRetaine cv.syncRender(cv.ctx, true); status = cv.swapBuffers(cv.ctx, - cv.screen.display, cv.drawable); if (status != Canvas3D.NOCHANGE) { cv.resetRendering(status); @@ -366,7 +363,7 @@ ArrayList<TextureRetained> textureIDResourceTable = new ArrayList<TextureRetaine } else if (mtype == MasterControl.FREECONTEXT_CLEANUP) { // from MasterControl freeContext(View v) cv = (Canvas3D) args[1]; - removeCtx(cv, cv.screen.display, cv.drawable, cv.ctx, + removeCtx(cv, cv.drawable, cv.ctx, true, true, false); } else if (mtype == MasterControl.RESETCANVAS_CLEANUP) { // from MasterControl RESET_CANVAS postRequest @@ -380,7 +377,6 @@ ArrayList<TextureRetained> textureIDResourceTable = new ArrayList<TextureRetaine Object[] obj = (Object []) args[1]; Canvas3D c = (Canvas3D) obj[0]; removeCtx(c, - ((Long) obj[1]).longValue(), (Drawable) obj[2], (Context) obj[3], false, !c.offScreen, @@ -563,7 +559,6 @@ ArrayList<TextureRetained> textureIDResourceTable = new ArrayList<TextureRetaine // 2) canvas.ctx should be null. canvas.drawable = canvas.createOffScreenBuffer(null, - canvas.screen.display, canvas.offScreenCanvasSize.width, canvas.offScreenCanvasSize.height); } catch (RuntimeException ex) { @@ -591,7 +586,6 @@ ArrayList<TextureRetained> textureIDResourceTable = new ArrayList<TextureRetaine // Fix for issue 175: destroy ctx & off-screen buffer // Fix for issue 340: get display, drawable & ctx from msg removeCtx(canvas, - ((Long) obj[1]).longValue(), (Drawable) obj[2], (Context) obj[3], false, !canvas.offScreen, true); @@ -832,7 +826,6 @@ ArrayList<TextureRetained> textureIDResourceTable = new ArrayList<TextureRetaine if (canvas.useSharedCtx) { if (sharedCtx == null) { - sharedCtxDisplay = canvas.screen.display; sharedCtxDrawable = canvas.drawable; // Always lock for context create @@ -1516,7 +1509,6 @@ ArrayList<TextureRetained> textureIDResourceTable = new ArrayList<TextureRetaine bgVworldToVpc = new Transform3D(); sharedCtx = null; sharedCtxTimeStamp = 0; - sharedCtxDisplay = 0; sharedCtxDrawable = null; dirtyRenderMoleculeList.clear(); dirtyRenderAtomList.clear(); @@ -1532,9 +1524,9 @@ ArrayList<TextureRetained> textureIDResourceTable = new ArrayList<TextureRetaine // This is only invoked from removeCtx()/removeAllCtxs() // with drawingSurface already lock - final void makeCtxCurrent(Context sharedCtx, long display, Drawable drawable) { + final void makeCtxCurrent(Context sharedCtx, Drawable drawable) { if (sharedCtx != currentCtx || drawable != currentDrawable) { - Canvas3D.useCtx(sharedCtx, display, drawable); + Canvas3D.useCtx(sharedCtx, drawable); /* if(!Canvas3D.useCtx(sharedCtx, display, drawable)) { Thread.dumpStack(); @@ -1550,7 +1542,7 @@ ArrayList<TextureRetained> textureIDResourceTable = new ArrayList<TextureRetaine // Canvas3D postRequest() offScreen rendering since the // user thread will not wait for it. Also we can just // reuse it as Canvas3D did not destroy. - private void removeCtx(Canvas3D cv, long display, Drawable drawable, Context ctx, + private void removeCtx(Canvas3D cv, Drawable drawable, Context ctx, boolean resetCtx, boolean freeBackground, boolean destroyOffScreenBuffer) { @@ -1568,22 +1560,22 @@ ArrayList<TextureRetained> textureIDResourceTable = new ArrayList<TextureRetaine // if it is the last one, free shared resources if (sharedCtx != null) { if (listOfCtxs.isEmpty()) { - makeCtxCurrent(sharedCtx, sharedCtxDisplay, sharedCtxDrawable); + makeCtxCurrent(sharedCtx, sharedCtxDrawable); freeResourcesInFreeList(null); freeContextResources(); - Canvas3D.destroyContext(sharedCtxDisplay, sharedCtxDrawable, sharedCtx); + Canvas3D.destroyContext(sharedCtxDrawable, sharedCtx); currentCtx = null; currentDrawable = null; } else { freeResourcesInFreeList(cv); } - cv.makeCtxCurrent(ctx, display, drawable); + cv.makeCtxCurrent(ctx, drawable); } else { - cv.makeCtxCurrent(ctx, display, drawable); + cv.makeCtxCurrent(ctx, drawable); cv.freeResourcesInFreeList(ctx); } cv.freeContextResources(this, freeBackground, ctx); - Canvas3D.destroyContext(display, drawable, ctx); + Canvas3D.destroyContext(drawable, ctx); currentCtx = null; currentDrawable = null; cv.drawingSurfaceObject.unLock(); @@ -1606,7 +1598,7 @@ ArrayList<TextureRetained> textureIDResourceTable = new ArrayList<TextureRetaine // Since we are now the renderer thread, // we can safely execute destroyOffScreenBuffer. if(destroyOffScreenBuffer) { - cv.destroyOffScreenBuffer(ctx, display, drawable); + cv.destroyOffScreenBuffer(ctx, drawable); cv.offScreenBufferPending = false; } } @@ -1629,19 +1621,17 @@ ArrayList<TextureRetained> textureIDResourceTable = new ArrayList<TextureRetaine // workaround Nvidia driver bug under Linux // that crash on freeTexture ID:4685156 if ((i == 0) && (sharedCtx != null)) { - makeCtxCurrent(sharedCtx, sharedCtxDisplay, sharedCtxDrawable); + makeCtxCurrent(sharedCtx, sharedCtxDrawable); freeResourcesInFreeList(null); freeContextResources(); - Canvas3D.destroyContext(sharedCtxDisplay, sharedCtxDrawable, sharedCtx); + Canvas3D.destroyContext(sharedCtxDrawable, sharedCtx); currentCtx = null; currentDrawable = null; } cv.makeCtxCurrent(); cv.freeResourcesInFreeList(cv.ctx); cv.freeContextResources(this, true, cv.ctx); - Canvas3D.destroyContext(cv.screen.display, - cv.drawable, - cv.ctx); + Canvas3D.destroyContext(cv.drawable, cv.ctx); currentCtx = null; currentDrawable = null; cv.drawingSurfaceObject.unLock(); diff --git a/src/classes/share/javax/media/j3d/Screen3D.java b/src/classes/share/javax/media/j3d/Screen3D.java index c627d39..fa412da 100644 --- a/src/classes/share/javax/media/j3d/Screen3D.java +++ b/src/classes/share/javax/media/j3d/Screen3D.java @@ -113,9 +113,6 @@ public class Screen3D extends Object { // an off-screen Canvas3D or with one or more on-screen Canvas3Ds boolean offScreen; - // The display connection (native OGL pipeline on X11 only) - long display; - // Screen number int screen; @@ -353,12 +350,10 @@ synchronized void notifyUsers() { screenViewCache = new ScreenViewCache(this); // Get the display handle and the screen number from the Pipeline - display = Pipeline.getPipeline().getDisplay(); screen = Pipeline.getPipeline().getScreen(graphicsDevice); if (debug) - System.err.println("Screen3D: display " + display + - " screen " + screen + " hashcode " + + System.err.println("Screen3D: screen " + screen + " hashcode " + this.hashCode()); if (!offScreen) { |