Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Close one GLCanvas and other GLCanvas goes blank on Mac(Close one GLCanvas and other GLCanvas goes blank on Mac)
Close one GLCanvas and other GLCanvas goes blank on Mac [message #968557] Fri, 02 November 2012 14:57 Go to next message
pb irish is currently offline pb irishFriend
Messages: 2
Registered: November 2012
Junior Member
I'm new to the project that I am working on and new to JOGL/Open GL, so I will do my best to describe the problem with enough information to be useful. The problem seems to be related to SWT and/or JOGL issues on Mac, so I posted the question here and on a JOGL forum hoping it strikes a chord with someone.

Our application runs on Linux, Windows, and Mac (not sure of the exact version of the Mac OS) and this problem only occurs on Mac machines.

The application creates multiple instances of FormEditors (org.eclipse.ui.forms.editor.FormEditor). Each FormEditor instance contains an instance of a FormPage (org.eclipse.ui.forms.editor.FormPage) which contains an instance of GLCanvas. When one editor is closed, the GLCanvas on all other open editors goes blank. When another editor is opened, the previously open editors are redrawn.

To be a little more precise without going into extensive detail, the FormPage contains a ScrolledForm (org.eclipse.ui.forms.ScrolledForm). The Composite returned from ScrolledForm.getBody(), is passed to FormToolkit.createComposite() to create a Composite which is passed to the GLCanvas constructor to finally result in a GLCanvas instance.

I was able to debug the problem to a point. When the FormEditor is closed, the progression of disposing of the FormEditor children eventually leads to the GLCanvas.SWTDispose event handler being fired. Within the handler, setData() is called. Within org.eclipse.swt.widgets.widget.setData(), setOpenGLContext is called. Within org.eclipse.swt.widgets.widget.setOpenGLContext(), the code gets an NSWindow from view.window (I believe that view is an instance of org.eclipse.swt.internal.cocoa.SWTCanvasView). The code calls setOpaque(true) on the NSWindow, and the GLCanvas in all editors go blank. If I open a new editor which creates a new instance of GLCanvas, setOpaque(false) is called during the process of creating the GLCanvas and all of the GLCanvas are redrawn.

It seems that the NSWinow is at a level above all of the editors causing all of them to be affected. I realize the description is a bit convoluted. I'm not going into all of the detail of the class hierarchies. I'm just trying to fire enough information out there that it might ring a bell with someone who can give me a push in the right direction.
Re: Close one GLCanvas and other GLCanvas goes blank on Mac [message #973290 is a reply to message #968557] Tue, 06 November 2012 08:03 Go to previous messageGo to next message
Lakshmi P ShanmugamFriend
Messages: 279
Registered: July 2009
Location: India
Senior Member
Hi,

Which version of eclipse/SWT do you see this? It sounds similar to the problem in this bug --> https://bugs.eclipse.org/bugs/show_bug.cgi?id=386177
It has been fixed in eclipse 4.2.1. You can try that version and see if it fixes your problem.


Lakshmi P Shanmugam

[Updated on: Tue, 06 November 2012 08:06]

Report message to a moderator

Re: Close one GLCanvas and other GLCanvas goes blank on Mac [message #973876 is a reply to message #973290] Tue, 06 November 2012 17:42 Go to previous message
pb irish is currently offline pb irishFriend
Messages: 2
Registered: November 2012
Junior Member
That is exactly the problem. We are using version 3.7 (Indigo) but have plans to swith to Juno soon. Your reply was very helpful.

Thanks.
Previous Topic:virtual on table with SWT.CHECK
Next Topic:Activating scrollbars for comboboxes inside the WebKit-Plugin
Goto Forum:
  


Current Time: Wed Apr 24 22:48:55 GMT 2024

Powered by FUDForum. Page generated in 0.02701 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top