Hi,
I tried to integrate a jogl canvas using GLJPanel in my fx app, however the display is not refreshed.
The 3d display() func is called, but nothing on display but a square not refreshed ....
here is the jfx code I used :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
| package partview; import javafx.ext.swing.SwingComponent; import javax.media.opengl.awt.GLJPanel;
import javax.media.opengl.awt.GLCanvas;
public class fx3dcanvas extends SwingComponent{ public var jpanel : GLJPanel; public var gears : Gears;
public function repaint(){ jpanel.repaint(); }
override function createJComponent() { jpanel = new GLJPanel(); gears = new Gears(); jpanel.addGLEventListener(gears); return jpanel; }
} |