Hello all,
I’m quite new to jogl, so maybe my problem is well-known. I successfully wrote a simple app with an AWT Frame containing a javax.media.opengl.GLCanvas
Frame testFrame = new Frame("TestFrame");
testFrame.setSize( 512, 384 );
javax.media.opengl.GLCanvas canvas = new javax.media.opengl.GLCanvas();
canvas.addGLEventListener(new Renderer());
testFrame.add( canvas );
I wanted to do the same with org.eclipse.swt.opengl.GLCanvas, but I could not find the addGLEventListener() method. Actually I tried to write that:
final Display display = new Display();
Shell shell = new Shell(display);
shell.setLayout(new FillLayout());
Composite parent = new Composite(shell, SWT.NONE);
parent.setLayout(new FillLayout());
GLData data = new GLData ();
data.doubleBuffer = true;
final org.eclipse.swt.opengl.GLCanvas canvas = new org.eclipse.swt.opengl.GLCanvas(parent, SWT.NONE, data);
//canvas.addGLEventListener(new Renderer()); // UNAVAILABLE!!
I could find the Snippet209 example that actually doesn’t use the GLEventListener interface, but I really would like to use it, in order to use the TraceGL, DebugGL and Animator tools.
Any idea? :-\