tags:

views:

235

answers:

2
+1  Q: 

Canvas3D and Swing

Hi,

This question is regarding the performance issue in Mac OS X

Canvas3D object is embedded in a JPanel; then the panel is integrated with the rest of the Swing-built application. Within that Canvas I am rendering a simple cube by applying certain transformations. At the initial launch It works fine. But when i try to resize the window or perform some operations on vertical or horizontal split bar buttons.Swing components take certain time to appear on the screen. A flashy white coloured thing appears first then swing components will appear? ( Totally saying flickering kind of stuff will happen). Is there any to solve this issue?

Kindly help me in this regard.

J3DSwinger

+1  A: 

If you are having issues with default rendering of Canvas3D, you should try off-screen rendering, double buffering, and actively rendering using timer. I would cap the rendering to some reasonable fps.

eed3si9n
+1  A: 

Java3D 1.5 now includes a component called JCanvas3D in the experimental package that does the off-screen rendering, double buffering and other things required to get Java3D to play nice in a Swing GUI.

See com.sun.j3d.exp.swing.JCanvas3D

Sheldon Young