Re: NativeWindowException: Unable to lock surface
Posted by
gouessej on
Aug 01, 2013; 10:45am
URL: https://forum.jogamp.org/NativeWindowException-Unable-to-lock-surface-tp4029205p4029697.html
Hi Céline
You can do this:
Display display = new Display();
Shell shell = new Shell(display);
shell.setLayout(new FillLayout());
Composite composite = new Composite(shell, SWT.BORDER);
GLWindow window = GLWindow.create(capabilities);
NewtCanvasSWT canvas = new NewtCanvasSWT(composite, SWT.NO_BACKGROUND, window);
window.addGLEventListener(new MyPrettyGLEventListener());
shell.setSize(300, 200);
shell.open();
I'm very interested in your feedback about NewtCanvasSWT in an Eclipse RCP application. Let us know whether something goes wrong.
Moreover, I think that the previous behaviour won't be restored but there's a way to fix that in OpenJDK 1.7, the graphics configuration picked up when you go to another monitor should be as capable as the previous one if possible.
If you use NEWT, it will be easier for us to ensure it just works even though SWT support wasn't the top 1 priority.