I'm having trouble with extending a Canvas3d...I've attached the code where
I
extend the Canvas3D...I removed all my preRender() postSwap(), etc code and
I
get the same effect as with having just the code below. Basically what
happens is that my Canvas3D and SWING seems to have problems ONLY if I
extend the
Canvas3D as I do below....I've attached a picture to show you the effect.
This
effect is noticable if I move the window off screen and bring it back. The
SWING
portion does not redraw for a few seconds (typically 5-10) ... on another
computer
I had a "paint smudge effect" instead of a simple white space as I show in
this picture.
Basically the same thing happens but instead of being white space the swing
side looks
like someone smudged it up...(hope that makes sense).

One thing though, if I simply use a Canvas3D (i.e. canvas3D = new
Canvas3D(Simple....)
I have absolutely NO problems....NONE. Refreshes right away without any
issue.
Only if I try to extend the Canvas3D do I have problems. Also, the Canvas
actually is
also unusable for the 5-10 seconds because when I move the window around I
can't
move anything in the canvas around.

Does anyone have any suggestions??? Am I missing something when I declare
the SpecialCanvas
and extend the Canvas3D???

I'm trying to use this extended canvas so I can overwrite the preRender,
postSwap, etc
routines for doing Overlays....they work great if I don't move the window
around
but If I move it then it gets screwed up...also, it does NOT get affected if
I open
a window on top of my Java Program...you know, if I move Explorer or
Netscape over
on top of the window it still is ok...only has problems when I move the
window itself.

Please give me all of your suggestions....

I'm using the latest Java3d api, but I believe I'm using the Java 2D
1.3...did not upgrade
to the new one because I had problems.

Thanks,

Mario

////////////////////////////////////////////////////////////////////////////
////
  canvas3D  = new
SpecialCanvas3D(SimpleUniverse.getPreferredConfiguration());

////////////////////////////////////////////////////////////////////////////
////
private class SpecialCanvas3D extends Canvas3D {

    private J3DGraphics2D graphics2D;

    public SpecialCanvas3D(GraphicsConfiguration graphicsConfiguration) {
      super(graphicsConfiguration);
    }

    public SpecialCanvas3D(GraphicsConfiguration graphicsConfiguration,
                           boolean offScreen) {
      super(graphicsConfiguration, offScreen);
    }

}
////////////////////////////////////////////////////////////////////////////
////


   Mario

Mariusz Zaczek
NASA - Johnson Space Center
Automated Vehicles and Orbit Analysis / DM35
Flight Design and Dynamics Division
Mission Operations Directorate
Bldg: 30A     Room: 3048B

Disclaimer: "The opinions, observations and comments expressed in my email
                   are strictly my own and do not necessarily reflect those
of NASA."

<<attachment: test.jpg>>

Reply via email to