>
> I would like to know if the Java3D development team
> has in mind to include a Swing, lightweigth component
> for rendering in near releases of Java3D.
>
> Canvas3D is good, but try to integrate it with a
> Swing application....

I'm not the most informed person on this, but it is my understanding that if
you want *FAST* 3D rendering, a Canvas3D component implemented as a
lightweight component will never happen. My speculation is that the Canvas3D
class maps to a native window handle, which is in turn owned by the OpenGL
pipeline. The 3D hardware writes directly to to the screen memory, which is
then immediately read by the D/A converter or the DVI subsystem. No frame
data is passed across the bus (assuming a modern graphics card with most of
the pipeline is implemented in hardware).

If a "JCanvas3D" class were to be implemented, every frame would have to be
rendered to an off-screen buffer, and then redrawn in the AWT rendering
loop. The number of frame copies becomes crazy: assuming the offscreen
buffer resides in 3D hardware memory (I guessing here; I don't know enough
about hardware design to know), the card would write to the buffer, which
would then be copied across the bus to main memory where it is processed by
the AWT rendering loop. The frame is then copied to the native Component
peer, where it is probably copied again to hardware memory for reading by
the output subsystem. Regardless of how fast your CPU or graphics card is,
the bus is certainly going to get bogged down with all the copies. Might as
well do software rendering....

I use Java3D in a Swing app with no problems (menus etc. work fine), and the
rendering is FAST!! (even at 1600x1200)  All I did was implement the steps
outlined at:

http://www.j3d.org/faq/swing.html

If framerate isn't an issue one could easily implement their own JComponent
subclass that does all rendering to an offcreen buffer and then copied in
the paintComponent(Graphics) method.

Anyone with better technical knowledge feel like filling in the gaps and/or
correcting my misunderstandings? This question comes up at lest once a
month, and am frankly tired of the Java3D team being accused of "bad design"
when the design they have implemented is the best possible given that speed
is top priority for many people. And calling the methods described in the
FAQ is hardly that big of a deal. Granted, Canvas3D doesn't work very well
in the JScrollPane, but I'd argue that if you want scrolling you should be
mapping the scroll bar events to view translate operations (i.e. do the
scrolling in Java3D space, not AWT space).

Simeon

===========================================================================
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