[FIXED] OSX / Java 7

Started by normen, August 14, 2012, 17:07:59

Previous topic - Next topic

bobbo

Is the source available on the repo?


bobbo

Thanks, this is what I was looking for.

Nick Wiggill

Hi all,

I would love to start doing some testing on Mac. What's the current status of this set of issues?

Cheers,

Nick

abcdef

Grab the binaries from

https://www.dropbox.com/s/b6gj27dmoyo0h0j/macosx.zip

See Kappa's posts for the latest (which is where I got this link from)

pizza2004

I'm not sure if this is a bug of this new version of LWJGL, or the latest version of Minecraft, but I suspect it is LWJGL, and I'm going to test that by reverting to the default version soon.  Anyway, I'm unable to right click by holding the control button and left clicking like you would expect to be able to, and it's bothering me because I don't like having to use the two finger method of right clicking all the time.

EDIT: I checked by forcing an update and then getting the latest snapshot and I could indeed use the control button to right click.  That means that it's an error in this version of LWJGL.  Glad to help with bugs, I hope you continue to make good progress and we see Java 7 support on Mac soon with this improved version of LWJGL.

bobbo

kappaOne, how close is this commit https://github.com/LWJGL/lwjgl/commit/790f895220cceb21324bc1957b8eae6ceba4d251 to having Display.setParent work with CALayer? I will get a VM going to test in a couple of days.

Is the glBlitFramebufferEXT in src/native/macosx/org_lwjgl_opengl_MacOSXCanvasPeerInfo.m intentionally clipped to 640/480 or is that left over from a test?

I am trying to figure out what is going on here but it's a little over my head, especially with the ObjC lisp syntax I don't understand.

Thank you.

kappa

Quote from: bobbo on January 05, 2013, 17:57:59
kappaOne, how close is this commit https://github.com/LWJGL/lwjgl/commit/790f895220cceb21324bc1957b8eae6ceba4d251 to having Display.setParent work with CALayer? I will get a VM going to test in a couple of days.
Still a few more steps left to implement before the CALayer stuff is ready.

Quote from: bobbo on January 05, 2013, 17:57:59
I am trying to figure out what is going on here but it's a little over my head, especially with the ObjC lisp syntax I don't understand.
Basically the Display.setParent stuff will work something like this, firstly we'll try to get the legacy NSView handle for the AWT Canvas (on OS X 10.5 and partially Apple Java 6), if found, we'll use that as its faster and simpler otherwise we'll use the Java CALayer/JAWT API to stick a custom Core Animation Layer on the AWT Canvas.

As the layer does its own drawing we share its opengl context with the main LWJGL Display opengl context to allow easy and fast transfer of data to it. Internally LWJGL's content will be draw to a FBO (instead of on the native Display window). Then when the layer is ready to draw, we'll simply blit the content of the LWJGL FBO onto it. Lastly since layers (unlike NSView's) have no concept of input and JAWT doesn't provide any other API's for this, we therefore can't use LWJGL's native input with them and will have to rely on using AWT to provide the input.

Quote from: bobbo on January 05, 2013, 17:57:59
Is the glBlitFramebufferEXT in src/native/macosx/org_lwjgl_opengl_MacOSXCanvasPeerInfo.m intentionally clipped to 640/480 or is that left over from a test?
Thats actually commented out code, currently being used for debug purposes.

bobbo

Wonderful, 7u11 is out. I'll keep checking up on this :-) Thanks Kappa

princec

Kappa - you say you've got RotT working with OpenJDK7 on the Mac then?

Cas :)

kappa

Quote from: princec on January 14, 2013, 08:45:22
Kappa - you say you've got RotT working with OpenJDK7 on the Mac then?

Cas :)
Yup, LWJGL OS X branch runs ROTT pretty well, just drop the above builds (lwjgl.jar and natives) over the current files.

If you are thinking of bundling OpenJDK7/Java7 then do keep in mind that OpenJDK7/Java7 only work on OS X 10.7+ and you'll have to use the system JRE when on OS X 10.5 and 10.6. You'll probably need to use some sort of launcher to detect the OS X version and use the appropriate Java runtime (possibly using a shell script that gets the OS X version).

kappa

New update:

After a lot of hackage the Display.setParent() should be working now, including on Java 7+ and with Java Applets.

Hopefully if all goes well with the new build, the OS X branch can be merged into the main LWJGL branch as most the heavy lifting is now done. Then its just a matter of polish, adding any missing bits and getting ready for a new LWJGL release.

Do please test and report any issues.

Latest experimental build here: https://www.dropbox.com/s/b6gj27dmoyo0h0j/macosx.zip

princec

boom! LWJGLException - native mouse cursors not supported.
Am in full on testing mode now. I'll test every build as soon as I see it.

Cas :)

bobbo

Fantastic work Kappa! I'll set up a couple of VirtualBox images to test on, this is exactly what I was waiting for.
Applets might not be popular right now but maybe I can help sway some opinions. :-)

pizza2004

Any resolution on my being unable to use the control + click as right click with this version bug?  It's such an integral part of Mac for a lot of people I'm sure, and it's commonly a lot more reliable than trying to use other methods (unless you have a two button mouse) so it would be nice if you'd fix it.