Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: Java plugin2 breaks OpenGL
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Java plugin2 breaks OpenGL



On Oct 23, 2010, at 3:11 PM, Kapta Ulo wrote:

Dear Sirs,

Since the new updates to the plugin2 system ('Out of Process Applets'), almost all of the applets related to java gaming and libraries have suffered a massively drop in performance and OpenGL applets have been broken totally (both LWJGL and JOGL libraries).

OpenGL applets have started to become pretty popular of late, with many companies now starting to look at this tech, as its cross platform and allows powerful 3d games to run easily in the browser. Its working well on Windows, Linux and plugin1 Macs.

There was a mention in some of the release notes that JOGL/LWJGL may work in the near future but with recent announcements, its unlikely this fix will ever see the light of day now and could lead to this tech unavailable in the future, besides there would still be a performance penalty if it worked through the current plugin2 rendering implementation.

I was hoping to find a solution to allow LWJGL to work on macs with plugin2 and hope you people can help out a little or provide some solutions or understanding to the inner workings of how the rendering is done with plugin2.

As I understand it, all rendering is now done to an offscreen buffer and then drawn into the browser using CoreGraphics.

LWJGL has its own native window (not swing or awt) when run as a normal application, when its run as an applet it grabs the window handle (HWND) of an AWT Canvas on the applet and embeds itself on it using setParent(). This works really well on linux and windows. Does plugin2 on mac with CoreGraphics even have a hwnd? is it possible to embed a native window some other way on plugin2?

In the CoreGraphics drawing model, there may not actually be a window at all, since target of the drawing may be shared memory between the browser process and a plugin "shim" process (which then kicks off it's own JVM when using Plugin2). Cross process window sharing is not easy and does not provide a reliable user experience on Mac OS X, even when you have access to the private SPI in the system.

Further, is old non CoreGraphics renderer still available (maybe some sort of jvm parameter could be added to enable it) ? I noticed that if you turn off 'out of process applets' to switch back to plugin1 it works, so maybe there is some internal way to enable this to work with plugin2. Do note LWJGL uses signed applets, so native code can be used to solve this problem and there are no sandbox restrictions.

Hopefully a solution can be found for this issue.

Our long-term goal is to move Plugin2 onto a CoreAnimation-based graphics rendering system, which will allow us to share a CALayer between processes. Ideally, 3D libraries like JOGL or LWJGL will be able to attach a OpenGL-backed sublayer, which will be inherited in the cross-process render tree automatically. This however, is still a ways off, and will require a substantial amount of engineering.

For now, unfortunately, the only viable option is to use Plugin1 in browsers that support it.

I hope this explains some of the technical issues that have to be overcome,
Mike Swingler
Java Engineering
Apple Inc.

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Java plugin2 breaks OpenGL (From: Kapta Ulo <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.