> Date:         Tue, 1 Jul 2003 20:07:51 +0100
> From: Ben Moxon <[EMAIL PROTECTED]>
>
> [...] when I add the Canvas3D to the swing application it draws a big
> old black rectangle over the middle of my screen (outside the bounds
> of the application) which only clears (over the application) when I
> force a repaint.
> [...]
> With a bit more debugging and stepping through stuff, it seems that the
> line that causes all the trouble is this one:
>
> public Canvas3D View3D = new
> Canvas3D(SimpleUniverse.getPreferredConfiguration());

Java 3D creates a temporary OpenGL context in order to query the
hardware capabilities and select the appropriate Windows pixel format or
Unix/X11 visual (known as a GraphicsConfiguration in Java).  This
doesn't cause any problems on any systems we use for development and
testing, but apparently is causing a visual artifact with the older ATI
card and OpenGL driver you're using.

If all of your Canvas3D instances are on the same screen and can use the
same Windows pixel format, then you can use the same
GraphicsConfiguration for each Canvas3D without having to call
getPreferredConfiguration() for each Canvas3D.  Save a reference to the
configuration you get the first time and use it for each Canvas3D to
avoid the problem.

> Date:         Wed, 2 Jul 2003 10:24:07 -0700
> From: Peter Kryszkiewicz <[EMAIL PROTECTED]>
>
> I had a similar problem, in my JTabbedPane app, where multiple JFrames
> containing Simple Universes ran fine. As soon as I tried to change to
> VirtualUniverse and sensing the hardware configuration on one panel,
> everything froze.
> [...]
> a canvas with null passed in does background config somehow? I used
> a null config and everything was fine again. Of course that still left
> the problem of why supplying a config to Canvas3D always created
> problems, but I didn't have time to chase it down yet.

Looks like another system-specific problem with multiple active
configurations.  When you specify a null configuration, Java 3D creates
a default one, stores a static reference to it, and uses the same one
for all subsequent Canvas3D instances specified with null
configurations.  If all the canvases are on the same screen and can use
the same pixel format, then use the same GraphicsConfiguration for each
canvas.

-- Mark Hood

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to