Still a few more steps left to implement before the CALayer stuff is ready.
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.
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.