Login  Register

Re: Some issues using NEWT

Posted by ac on Feb 20, 2012; 2:31am
URL: https://forum.jogamp.org/Some-issues-using-NEWT-tp3757230p3759652.html

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). 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.