NewtCanvasSWT and SashForm

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

NewtCanvasSWT and SashForm

Tomas
Hi guys,

I've been playing with JOGL RC11 and Eclipse RCP (e4) on OSX 10.8.2 mostly for fun.

When using NewCanvasSWT in a SashForm it seem to always be placed at top left corner. See screenshots.

The triangle should in rendered to the right, not the left side:
The triangle should in rendered to the right, not the left side.

After resizing the SashForm a bit:
After resizing the SashForm.

The setup is just a simple shell with a Sash. Please see the attached file.

NewtSashTest.java

Any ideas, workarounds ?

Cheers
// Tomas

Reply | Threaded
Open this post in threaded view
|

Re: NewtCanvasSWT and SashForm

Sven Gothel
Administrator
On 01/21/2013 05:12 PM, Tomas [via jogamp] wrote:

> Hi guys,
>
> I've been playing with JOGL RC11 and Eclipse RCP (e4) on OSX 10.8.2 mostly for
> fun.
>
> When using NewCanvasSWT in a SashForm it seem to always be placed at top left
> corner. See screenshots.
>
> *The triangle should in rendered to the right, not the left side:*
> The triangle should in rendered to the right, not the left side.
>
> *After resizing the SashForm a bit:*
> After resizing the SashForm.
>
> The setup is just a simple shell with a Sash. Please see the attached file.
>
> NewtSashTest.java <http://forum.jogamp.org/file/n4027951/NewtSashTest.java>
>
> Any ideas,
Please file a bug report:
 - 'NewtCanvasSWT ignore windowing offset on OSX'
and include your findings (this text w/ pics)

Does this happen w/ our SWT GLCanvas ?
(Note: This also uses native parenting)

Does this happen on other platforms than OSX ?

> workarounds ?

We surely can fix this issue, pls answer above questions
and file the bug report - thx.

~Sven

>
> Cheers
> // Tomas


signature.asc (911 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: NewtCanvasSWT and SashForm

Tomas
This post was updated on .
It works with the SWT GLCanvas.

(Update:) However I don't seem to get any reshape events in runtime.


I'll do some tests tomorrow at work where I have some more systems to play with.

Cheers
// Tomas

Reply | Threaded
Open this post in threaded view
|

Re: NewtCanvasSWT and SashForm

Sven Gothel
Administrator
On 01/21/2013 07:01 PM, Tomas [via jogamp] wrote:
> It works with the SWT GLCanvas.
Our [JOGL's] SWT GLCanvas  - or the Eclipse/SWT GLCanvas ?

>
> I'll do some tests tomorrow at work where I have some more systems to play with.

Thx.

~Sven

>
> Cheers
> // Tomas


signature.asc (911 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: NewtCanvasSWT and SashForm

Tomas
An updated report

NewtCanvasSWT
* Incorret offset on OSX ( bug 672)
* OK under Linux

JOGAMP SWT Canvas
* Correct offset under OSX
* No reshape events are triggered for OSX and Linux (bug 673)

Eclipse SWT Canvas :
* OK under OSX
* Don't work under Linux, but I guess this is the SWT-team's problem :)

Note: I haven't tested it on Windows. I'll update the report when I have the time to do it.

See attachment for the three snippets.

newt-jogamp-swt.zip


Cheers
// Tomas




Reply | Threaded
Open this post in threaded view
|

Re: NewtCanvasSWT and SashForm

Sven Gothel
Administrator
On 01/22/2013 08:10 PM, Tomas [via jogamp] wrote:

> An updated report
>
> NewtCanvasSWT
> * Incorret offset on OSX ( bug 672)
> * OK under Linux
>
> JOGAMP SWT Canvas
> * Correct offset under OSX
> * No reshape events are triggered for OSX and Linux (bug 673)
>
> Eclipse SWT Canvas :
> * OK under OSX
> * Don't work under Linux, but I guess this is the SWT-team's problem :)
>
> Note: I haven't tested it on Windows. I'll update the report when I have the
> time to do it.
>
> See attachment for the three snippets.
Perfect - thank you very much .

Added a new 'swt' component under module 'jogl',
and a new 'umbrella' bug 674 grouping your new entries.

~Sven



signature.asc (911 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: NewtCanvasSWT and SashForm

Tomas
I cloned the latest git rep and built directly from source. Bug 673 seems to have been fixed.

Cheers
// Tomas
Reply | Threaded
Open this post in threaded view
|

Re: NewtCanvasSWT and SashForm

Tomas
BTW: Which threading model does the [JOGAMP] SWT GLCanvas expect. From what I could tell from the source it expected the SWT thread to call display and update the glcontext.

The Animator however seem to create a new thread and call display directly without invoking the SWT thread for the display update ...

Or am I missing something ?

Cheers
// Tomas


Reply | Threaded
Open this post in threaded view
|

Re: NewtCanvasSWT and SashForm

Sven Gothel
Administrator
On 01/23/2013 05:18 PM, Tomas [via jogamp] wrote:
> BTW: Which threading model does the [JOGAMP] SWT GLCanvas expect. From what I
> could tell from the source it expected the SWT thread to call display and
> update the glcontext.
>
> The Animator however seem to create a new thread and call display directly
> without invoking the SWT thread for the display update ...
>
> Or am I missing something ?

Nope .. we completely ignore any threading restrictions for 'display' calls,
but respect SWT restrictions for lifecycle operations.

~Sven



signature.asc (911 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: NewtCanvasSWT and SashForm

Jesus Zazueta
Sorry for reviving a old thread, but I just wanted to say a big thank you guys for implementing updated versions for both NEWT and SWT GLCanvas. Hopefully my project will be less limited than with the legacy SWT GLCanvas implementation.

Cheers!
Reply | Threaded
Open this post in threaded view
|

Re: NewtCanvasSWT and SashForm

gouessej
Administrator
datSilencer wrote
Hopefully my project will be less limited than with the legacy SWT GLCanvas implementation.
Thank you for the feedback :) Usually people come here when it doesn't work lol. Eclipse SWT GLCanvas stopped being maintained in 2005 or 2006, it's totally obsolete.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: NewtCanvasSWT and SashForm

orange-vertex
In reply to this post by Tomas
Hi all,

I made a pull request for a bugfix for this right here

Test case provided by OP should show the result!

Reply | Threaded
Open this post in threaded view
|

Re: NewtCanvasSWT and SashForm

gouessej
Administrator
Thank you very much :)
Julien Gouesse | Personal blog | Website