Re: Some issues using NEWT
Posted by
Sven Gothel on
Feb 20, 2012; 8:24am
URL: https://forum.jogamp.org/Some-issues-using-NEWT-tp3757230p3760111.html
On 02/20/2012 03:31 AM, ac [via jogamp] wrote:
>
>
> I run my test case again using the jogl and gluegen autobuilds from today. I
> realized that the problem with the missing window decorations was that I had
> to set the bounds and location of the canvas:
>
> canvas.setBounds(0, 0, 300, 300);
> insets = frame.getInsets();
> canvas.setLocation(insets.left, insets.top);
>
> Here is the corrected code:
http://pastebin.com/DUthqZrC>
> So, adding the canvas to the frame works fine now (I still need to figure
> out the event handling, but that's a separate thing).
Awesome, thank you for saving my time looking into it.
Again: Hooking NEWT to AWT up, we have lots of unit test doing so,
and the mentioned NEWT/Applet container code.
> However, I wonder why
> the framerate doesn't work properly when adding the frame to the applet
> instead (in the sample code, the framerate is set to 120, which is honored
> when adding the canvas to the frame, but not when adding it to the applet).
> Is this a expected behavior, or a possible bug in NEWT? I ask because this
> framerate issue appears only on OSX, but not on Linux or Windows.
Right .. sorry.
This is because of using the OSX CALayer (offscreen animation layer),
which has it's own static refresh cycle.
We need to tune this code path (if possible), eg. hand 'down' the fps values.
Pls create a bug report - if you don't mind.
~Sven