Animator stutters on OSX + Java 7?

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

Animator stutters on OSX + Java 7?

ac
Hi, I'm testing the use of GLAnimatorControl to drive my animation loop, and it turns out that the rendering becomes very choppy under OSX with Java 1.7. In particular, this program runs smoothly on OSX 10.8.3 and Java 6:

https://github.com/codeanticode/jogl2-tests/tree/master/src/test/animator

but as soon as I switch to Java 7 without making any other change, the playback stutters significantly. This test program is part of an Eclipse project that I put on github here:

https://github.com/codeanticode/jogl2-tests

I don't see any difference between java 6 and 7 on Windows, at least for this particular case.

Andres
Reply | Threaded
Open this post in threaded view
|

Re: Animator stutters on OSX + Java 7?

gouessej
Administrator
Hi

You still use AWT whose support is quite experimental in Oracle Java 1.7. We are not responsible for this. Use NEWT and you won't have this kind of trouble.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Animator stutters on OSX + Java 7?

Sven Gothel
Administrator
In reply to this post by ac
I don't see anything special, i.e. your demo is similar to out GearsES2 unit tests (AWT),
which runs OK on OSX 10.6/10.7 w/ Java7.
In short: It should work.

Pls file a bug report w/ detailed version information - however, Julien's notion might be correct,
that this is due to some Java7/AWT issues. Nevertheless, we should verify this ofc.
ac
Reply | Threaded
Open this post in threaded view
|

Re: Animator stutters on OSX + Java 7?

ac
Ok, I split the Animator code into two separate test cases, one for NEWT and the other for AWT:

https://github.com/codeanticode/jogl2-tests/tree/master/src/test/animator

And indeed, the stuttering on OSX 10.8.3 and Java 7 occurs only with the AWT version. I will go ahead and open a bug report about it.

In relation to the use of the Animator, more specifically the FPSAnimator, I had some issues irrespective of using Java 6 or 7, OSX or Windows. Basically, I don't get the screen to update, even though the animator is running. The test case that shows this behavior is the following:

https://github.com/codeanticode/jogl2-tests/blob/master/src/test/applet/AnimApplet.java

which, as I mentioned, happens on windows and OSX, Java 6 and 7. The code is fairly straightforward, I initialize the JOGL using either AWT or NEWT, right now is set to NEWT but the problem happens with both, and then launch the FPSAnimator in the start() method. The only unusual thing is the use of an Applet embedded inside a Frame, it is done this way in order to mimic the architecture of a Processing program.

I'm trying to use JOGL from Processing correctly, either with an animator or the invoke() approach (as discussed on my other recent post), but if the Applet/Frame structure is not well supported by JOGL and it is what is causing the problems, then I might need to do some major refactoring in Processing. Of course, changing the Frame/Applet structure might induce significant breakage since it has been used since the early days of the project.
Reply | Threaded
Open this post in threaded view
|

Re: Animator stutters on OSX + Java 7?

gouessej
Administrator
If I were you, I would use NEWT without any animator. Someone already reported that FPSAnimator was not always reliable under Windows. If some people needs some interoperability with AWT, you can still use the NEWT/AWT bridge.
Julien Gouesse | Personal blog | Website
ac
Reply | Threaded
Open this post in threaded view
|

Re: Animator stutters on OSX + Java 7?

ac
Hello Julien, I'm also testing NEWT w/out any animator, but still need some sort of timing mechanism, this is why I'm experimenting with the invoke() method, as you suggested earlier. However, I'm having problems to make the invoke approach to work, but this is the ongoing discussion in the other thread.