diff options
author | Harvey Harrison <[email protected]> | 2012-08-24 13:40:48 -0700 |
---|---|---|
committer | Harvey Harrison <[email protected]> | 2012-08-24 13:40:48 -0700 |
commit | 6cdec478f34cb7aa9583bcd17a77453d15d9a87f (patch) | |
tree | c7eac3885a4d34b760d7a4c17342665d705c0b5b | |
parent | a05734591fd53a3ee4d2cc0a388fa0c3086366b9 (diff) |
j3dcore: the fbConfig variable is always zero in all remaining pipelines
Totally unused now.
Signed-off-by: Harvey Harrison <[email protected]>
-rw-r--r-- | src/classes/share/javax/media/j3d/Canvas3D.java | 36 | ||||
-rw-r--r-- | src/classes/share/javax/media/j3d/JoglPipeline.java | 15 | ||||
-rw-r--r-- | src/classes/share/javax/media/j3d/NoopPipeline.java | 14 | ||||
-rw-r--r-- | src/classes/share/javax/media/j3d/Pipeline.java | 11 | ||||
-rw-r--r-- | src/classes/share/javax/media/j3d/Renderer.java | 3 |
5 files changed, 22 insertions, 57 deletions
diff --git a/src/classes/share/javax/media/j3d/Canvas3D.java b/src/classes/share/javax/media/j3d/Canvas3D.java index 44ed868..0e44877 100644 --- a/src/classes/share/javax/media/j3d/Canvas3D.java +++ b/src/classes/share/javax/media/j3d/Canvas3D.java @@ -616,20 +616,6 @@ public class Canvas3D extends Canvas { // is defined by the Pipeline. Drawable drawable = null; - // fbConfig is a pointer to the fbConfig object that is associated with - // the GraphicsConfiguration object used to create this Canvas. - // - // For Unix : Fix for issue 20. - // The fbConfig is only used when running X11. It contains a pointer - // to the native GLXFBConfig structure list, since in some cases the visual id - // alone isn't sufficient for the native OpenGL renderer (e.g., when using - // Solaris OpenGL with Xinerama mode disabled). - // - // For Windows : Fix for issue 76. This is use as a holder of the - // PixelFormat structure ( see also gldef.h ) to allow value such - // as offScreen's pixelformat, and ARB function pointers to be stored. - long fbConfig = 0; - // offScreenBufferInfo is a pointer to additional information about the // offScreenBuffer in this Canvas. // @@ -1111,8 +1097,6 @@ ArrayList<TextureRetained> textureIDResourceTable = new ArrayList<TextureRetaine GraphicsConfigInfo gcInfo = graphicsConfigTable.get(graphicsConfiguration); requestedStencilSize = gcInfo.getGraphicsConfigTemplate3D().getStencilSize(); - fbConfig = Pipeline.getPipeline().getFbConfig(gcInfo); - if (offScreen) { // Issue 131: set manual rendering flag based on whether this is @@ -2428,7 +2412,6 @@ ArrayList<TextureRetained> textureIDResourceTable = new ArrayList<TextureRetaine Context createNewContext(Context shareCtx, boolean isSharedCtx) { Context retVal = createNewContext(this.screen.display, this.drawable, - this.fbConfig, shareCtx, isSharedCtx, this.offScreen); // compute the max available texture units @@ -3654,8 +3637,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, - fbConfig, offScreen, 1, 1); + createQueryContext(screen.display, drawable, offScreen, 1, 1); // compute the max available texture units maxAvailableTextureUnits = Math.max(maxTextureUnits, maxTextureImageUnits); } @@ -4792,28 +4774,28 @@ void addTextureResource(int id, TextureRetained obj) { // This is the native method for creating the underlying graphics context. private Context createNewContext(long display, Drawable drawable, - long fbConfig, Context shareCtx, boolean isSharedCtx, + Context shareCtx, boolean isSharedCtx, boolean offScreen) { return Pipeline.getPipeline().createNewContext(this, display, drawable, - fbConfig, shareCtx, isSharedCtx, + shareCtx, isSharedCtx, offScreen); } private void createQueryContext(long display, Drawable drawable, - long fbConfig, boolean offScreen, int width, int height) { + boolean offScreen, int width, int height) { Pipeline.getPipeline().createQueryContext(this, display, drawable, - fbConfig, offScreen, width, height); + offScreen, width, height); } // This is the native for creating offscreen buffer - Drawable createOffScreenBuffer(Context ctx, long display, long fbConfig, int width, int height) { + Drawable createOffScreenBuffer(Context ctx, long display, int width, int height) { return Pipeline.getPipeline().createOffScreenBuffer(this, - ctx, display, fbConfig, width, height); + ctx, display, width, height); } - void destroyOffScreenBuffer(Context ctx, long display, long fbConfig, Drawable drawable) { + void destroyOffScreenBuffer(Context ctx, long display, Drawable drawable) { assert drawable != null; - Pipeline.getPipeline().destroyOffScreenBuffer(this, ctx, display, fbConfig, drawable); + Pipeline.getPipeline().destroyOffScreenBuffer(this, ctx, display, drawable); } // This is the native for reading the image from the offscreen buffer diff --git a/src/classes/share/javax/media/j3d/JoglPipeline.java b/src/classes/share/javax/media/j3d/JoglPipeline.java index 124b81c..ff2be70 100644 --- a/src/classes/share/javax/media/j3d/JoglPipeline.java +++ b/src/classes/share/javax/media/j3d/JoglPipeline.java @@ -6169,7 +6169,7 @@ class JoglPipeline extends Pipeline { // This is the native method for creating the underlying graphics context. Context createNewContext(Canvas3D cv, long display, Drawable drawable, - long fbConfig, Context shareCtx, boolean isSharedCtx, + Context shareCtx, boolean isSharedCtx, boolean offScreen) { if (VERBOSE) System.err.println("JoglPipeline.createNewContext()"); GLDrawable draw = null; @@ -6259,7 +6259,7 @@ class JoglPipeline extends Pipeline { } void createQueryContext(Canvas3D cv, long display, Drawable drawable, - long fbConfig, boolean offScreen, int width, int height) { + boolean offScreen, int width, int height) { if (VERBOSE) System.err.println("JoglPipeline.createQueryContext()"); // FIXME: for now, ignoring the "offscreen" flag -- unclear how @@ -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, long fbConfig, int width, int height) { + Drawable createOffScreenBuffer(Canvas3D cv, Context ctx, long display, 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, long fbConfig, Drawable drawable) { + void destroyOffScreenBuffer(Canvas3D cv, Context ctx, long display, Drawable drawable) { if (VERBOSE) System.err.println("JoglPipeline.destroyOffScreenBuffer()"); JoglDrawable jdraw = (JoglDrawable) drawable; @@ -7897,13 +7897,6 @@ class JoglPipeline extends Pipeline { */ } - // Get the native FBconfig pointer - long getFbConfig(GraphicsConfigInfo gcInfo) { - if (VERBOSE) System.err.println("JoglPipeline.getFbConfig()"); - return 0L; // Dummy method in JOGL - } - - private static final int DISABLE_STEREO = 1; private static final int DISABLE_AA = 2; private static final int DISABLE_DOUBLE_BUFFER = 3; diff --git a/src/classes/share/javax/media/j3d/NoopPipeline.java b/src/classes/share/javax/media/j3d/NoopPipeline.java index d661e22..63a3b3d 100644 --- a/src/classes/share/javax/media/j3d/NoopPipeline.java +++ b/src/classes/share/javax/media/j3d/NoopPipeline.java @@ -952,21 +952,21 @@ class NoopPipeline extends Pipeline { // This is the native method for creating the underlying graphics context. Context createNewContext(Canvas3D cv, long display, Drawable drawable, - long fbConfig, Context shareCtx, boolean isSharedCtx, + Context shareCtx, boolean isSharedCtx, boolean offScreen) { return new NoopContext(); } void createQueryContext(Canvas3D cv, long display, Drawable drawable, - long fbConfig, boolean offScreen, int width, int height) { + boolean offScreen, int width, int height) { } // This is the native for creating offscreen buffer - Drawable createOffScreenBuffer(Canvas3D cv, Context ctx, long display, long fbConfig, int width, int height) { + Drawable createOffScreenBuffer(Canvas3D cv, Context ctx, long display, int width, int height) { return null; } - void destroyOffScreenBuffer(Canvas3D cv, Context ctx, long display, long fbConfig, Drawable drawable) { + void destroyOffScreenBuffer(Canvas3D cv, Context ctx, long display, Drawable drawable) { } // This is the native for reading the image from the offscreen buffer @@ -1219,12 +1219,6 @@ class NoopPipeline extends Pipeline { return gconfig; } - // Get the native FBconfig pointer - long getFbConfig(GraphicsConfigInfo gcInfo) { - return 0L; - } - - // Get best graphics config from pipeline GraphicsConfiguration getBestConfiguration(GraphicsConfigTemplate3D gct, GraphicsConfiguration[] gc) { diff --git a/src/classes/share/javax/media/j3d/Pipeline.java b/src/classes/share/javax/media/j3d/Pipeline.java index 5636e3e..779575f 100644 --- a/src/classes/share/javax/media/j3d/Pipeline.java +++ b/src/classes/share/javax/media/j3d/Pipeline.java @@ -965,16 +965,16 @@ public Pipeline run() { // This is the native method for creating the underlying graphics context. abstract Context createNewContext(Canvas3D cv, long display, Drawable drawable, - long fbConfig, Context shareCtx, boolean isSharedCtx, + Context shareCtx, boolean isSharedCtx, boolean offScreen); abstract void createQueryContext(Canvas3D cv, long display, Drawable drawable, - long fbConfig, boolean offScreen, int width, int height); + boolean offScreen, int width, int height); // This is the native for creating offscreen buffer - abstract Drawable createOffScreenBuffer(Canvas3D cv, Context ctx, long display, long fbConfig, int width, int height); + abstract Drawable createOffScreenBuffer(Canvas3D cv, Context ctx, long display, int width, int height); - abstract void destroyOffScreenBuffer(Canvas3D cv, Context ctx, long display, long fbConfig, Drawable drawable); + abstract void destroyOffScreenBuffer(Canvas3D cv, Context ctx, long display, 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); @@ -1167,9 +1167,6 @@ public Pipeline run() { // an exception if one cannot be returned. abstract GraphicsConfiguration getGraphicsConfig(GraphicsConfiguration gconfig); - // Get the native FBconfig pointer - abstract long getFbConfig(GraphicsConfigInfo gcInfo); - // Get best graphics config from pipeline abstract GraphicsConfiguration getBestConfiguration(GraphicsConfigTemplate3D gct, GraphicsConfiguration[] gc); diff --git a/src/classes/share/javax/media/j3d/Renderer.java b/src/classes/share/javax/media/j3d/Renderer.java index 0da7b5f..5cf89d4 100644 --- a/src/classes/share/javax/media/j3d/Renderer.java +++ b/src/classes/share/javax/media/j3d/Renderer.java @@ -564,7 +564,6 @@ ArrayList<TextureRetained> textureIDResourceTable = new ArrayList<TextureRetaine canvas.drawable = canvas.createOffScreenBuffer(null, canvas.screen.display, - canvas.fbConfig, canvas.offScreenCanvasSize.width, canvas.offScreenCanvasSize.height); } catch (RuntimeException ex) { @@ -1607,7 +1606,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, cv.fbConfig, drawable); + cv.destroyOffScreenBuffer(ctx, display, drawable); cv.offScreenBufferPending = false; } } |