Summary: | JOGL applet test doesn't work on Firefox or Chrome on Mac OS X 10.6.7 | ||
---|---|---|---|
Product: | [JogAmp] Jogl | Reporter: | Wade Walker <wwalker3> |
Component: | applet | Assignee: | Sven Gothel <sgothel> |
Status: | VERIFIED FIXED | ||
Severity: | normal | CC: | bino_george, gabnicu, michael.mcdougall, wacker |
Priority: | --- | ||
Version: | 2 | ||
Hardware: | All | ||
OS: | macosx | ||
Type: | --- | SCM Refs: | |
Workaround: | --- | ||
Attachments: | Java console output during applet load |
Description
Wade Walker
2011-04-23 00:25:21 CEST
Created attachment 251 [details]
Java console output during applet load
This log file shows the applet loading (apparently normally, even though we can't see anything but a white blank). It also shows the applet's close message when I close the browser window.
known issue, pls set your java settings to compatible, i.e. not in it's own process. after siggraph, we have to tackle OSX in a whole. Found some additional info on this at http://lists.apple.com/archives/java-dev/2011/Aug/msg00067.html. It looks like under Lion, as of Safari 5.1 and later, all browsers use Plugin2, which currently requires a new rendering model to use correctly. There's some example code at http://developer.apple.com/library/mac/#samplecode/JAWTExample/Introduction/Intro.html, which I successfully built and tested in Xcode 4 (it required a few project changes), but to work this into JOGL seems like it would require major changes, since you can only draw when you're inside the drawInOpenGLContext of the custom NSOpenGLLayer. I will have a look at it at a later time. However, it should be possible to fix NEWT on OSX (main thread issue), and then just use the NEWT/AWT parenting, where we use JAWT for acquiring the native window handle. I almost completed this change for NEWT/OSX when I left this work behind. Maybe you are right in case of native AWT peer rendering (the AWT GLCanvas) method. Just a few thoughts .. Supposedly that won't work (see here for details: http://lists.apple.com/archives/java-dev/2011/Aug/msg00067.html). The Apple engineers say that OS X has some security restrictions that prevent other processes from rendering into your window or creating new controls that are children of your window. So their solution is for applets to render into a layer that's shared with the browser, but even this rendering can't happen asynchronously -- it must be done only when CAOpenGLLayers allows it. They say they're working with Oracle engineers on this, and are willing to work with JOGL and LWJGL engineers too, but the way forward doesn't seem clear yet. I briefly read the example code as well .. hmm. so you say it's not enough to have the ds->Lock(ds) <do it> ds->Unlock(ds) block in place ? i.e. drawing surface lock ? if the surface lock is all which is required, the NEWT/JAWT code shall work though. maybe we can chat later today or next week about this to plan a solution, I would appreciate this. Hopefully we can make an outline the 'playground'. As of Java for Mac OS X 10.6 Update 4 and 10.5 Update 9 there is an addition to the JAWT API that enables 3rd party 3D technologies in applets outside of the browser process (Plugin2). More info at : http://developer.apple.com/library/mac/#releasenotes/Java/JavaSnowLeopardUpdate4LeopardUpdate9RN/NewandNoteworthy/NewandNoteworthy.html The JAWT example at : http://developer.apple.com/library/mac/#samplecode/JAWTExample/Introduction/Intro.html has been modified to show how to use this new API. The LWJGL folks have already adopted this API and you can see there results at : http://lwjgl.org/forum/index.php/topic,4023.0.html Official announcement here: <http://lwjgl.org/forum/index.php/topic,4023.msg22405.html#msg22405> Demos here: <http://app.3dviewr.com/#test/sintel_rig_cleaned.dae> If JOGL needs to render from arbitrary threads into the layer, you will need to go through an FBO, such that arbitrary rendering from multiple threads go to the FBO for the applet and then the contents of the FBO is copied to the CALayer in the layer's drawInCGLContext: method. http://developer.apple.com/library/mac/#documentation/GraphicsImaging/Reference/CAOpenGLLayer_class/Introduction/Introduction.html Implemented and manual tested. Will be available for public w/ RC4 (ie next signed release). (In reply to comment #8) > Implemented and manual tested. Will be available for public w/ RC4 (ie next > signed release). Hello, My name is Gabriel Nicula and we would be interested in the new release containing this major fix - we have a Java3D applet that doesn't run anymore on MacOS with JRE above 1.6.0.17. When is this RC4 scheduled for? Conversely, could we use one of the dayly/nightly builds? Thx, Gabi |