Has anyone tried to mix SWT with a JOGL GLCanvas ? Does it work and does it solve the classic swing overlay problem.
Any performance or stability problems ?
// Tomas
Has anyone tried to mix SWT with a JOGL GLCanvas ? Does it work and does it solve the classic swing overlay problem.
Any performance or stability problems ?
// Tomas
Hi, I experimented with JOGL and SWT quite extensively about a year ago. I can post you the details later on today (I’m in a hurry atm).
Cheers
To use GLCanvas with swt, I do this:
public class GLPanel extends Panel{
private GLCanvas canvas = null;
private GL gl;
private GLU glu;
public GLPanel(){
GLCapabilities cap = new GLCapabilities();
this.canvas = GLDrawableFactory.getFactory().createGLCanvas(cap);
this.setLayout(new BorderLayout());
this.add(canvas);
}
.....
}
private void addGlCanvas(Composite parent)
{
FillLayout fl = new FillLayout();
parent.setLayout(fl);
Composite glCompo = new Composite(parent, SWT.EMBEDDED);
// bridje swt -> awt
fDrawSurface = new GLPanel();
fDrawSurface.addAdjustmentListener(this);
Frame awtFrame = SWT_AWT.new_Frame(glCompo);
awtFrame.add(fDrawSurface);
}
Work’s fine.
thx
BTW. Did you expirience any overlay problems ? Like the traditionaly menus appearing appearing behind the canvas and such.
// Tomas