LWJGL Applets on MacOSX 10.7

Started by Alain21, September 10, 2011, 00:54:13

Previous topic - Next topic

Alain21

I've tried to get my game running within an applet, but could get it to work under Mac OSX 10.7.
When running as an application, instead of applet, everything works great on mac. And even using the same applet code, everything works great on Linux and Windows.

The weird thing is that even the basic GL Gears program doesn't work.

I've tried searching everywhere on Sun website and I keep getting information to got the Java preference and click the "Applet Run on their own thread" or something like that ... but I believe that they changed the layout of the Java preference in 10.7 and that option is no longer available.

Anyone have some similar problem ?

kappa

Only way to run LWJGL Applets on Mac OS X 10.7 is to use the nightly builds of LWJGL 2.8+. All older version no longer work on OS X.

Alain21

Arg ... alright I'll tried that ...

would you have a technical idea why ?

princec

In a nutshell, Apple broke the plugin interface for Java quite some time ago (10.6 I believe), and our esteemed contributors have only just figured out how to get around the problem a few days ago.

Cas :)

Alain21

Oh great !! ... it does work ... however maybe 3-4 times slower than running as an application ... But it's better than nothing

@princec
If I actually want to dig deeper into the actual lwjgl library to contribute an enhancement ... would you have an idea where I should start digging for this particular problem?

kappa

A bit more explination should hopefully clear up why its slower, all plugins on OS X now have to use CALayers to work in any of the modern browsers. CALayers essential use render to texture to create an image which is then passed to the browser. The logic behind this is that it allows the browser to draw the whole webpage in one go and thus allow any plugins to integrate much more nicely (previously it was just a window stuck on the webpage). The render to texture bit does have its performance penalites so not sure you'll be able to do much in this area but feel free to try, however 3-4 times slower does sound a bit excessive, how did you measure this?.

If would like to attempt an enchancement feel free to dig into the source code and submit any patch to the RFE page, you could also start by visiting the #lwjgl irc channel (irc.freenode.net) where some of the developers usually hang out to get more info on certain parts of lwjgl.

Alain21

[...]
performance penalites so not sure you'll be able to do much in this area but feel free to try, however 3-4 times slower does sound a bit excessive, how did you measure this?.

[...]

Humm ... welll my measuring tool is kinda my eyes :D hehe. I must admit that I have an old macbook (not the pro) 13inch Late 2006 (as it says in the "about this mac", I would appreciate if anyway with a faster mac give me some feedback on speed : http://www.bianisoft.com/myFiles/BianisoftTestApp.html

Comparing Windows vs Mac or vs linux

Mickelukas

62 fps on windows 7. Seems capped though.

Mike

Alain21

Quote from: Mickelukas on September 15, 2011, 09:53:56
62 fps on windows 7. Seems capped though.

Mike

Tks for trying ;) it is indeed capped :) Now I'm curious to see if someone with a good mac are getting the same results.

The weird thing with my FPS counter on my old mac is that it is very unpredicatable ... I will see 200, 5, 30, 10, 100, all in a rapid sucession ... but really the game feel like going at 15-20 fps ...

Hmmm i should just build an average of the Fps and draw update it once per second.