Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: inter process NSView sharing



Am 23.05.2008 um 16:16 schrieb Jonathan Cochrane:
Now, on OSX the java app gets a NSView/cocoaviewref. Is there some member of NSView similar to the HWND on windows that I can pass to my C process? The C process can then create a hardware accelerated opengl rendering context from this 'handle' and render to the java apps NSView.

I've looked at using Distributed Objects, however the C application would need quite a bit of rework to make it fit into the Cocoa application framework, so this is not an option. So, can a non cocoa application communicate with a distributed object ?


Hi,

one option nobody's mentioned so far is that, on the Mac, you can create transparent windows. So, your Java app could create a transparent window and show it on top of the other app's window, making it appear as if they were in the same window.

Not sure how one does that in Java, but at worst I'd guess you could use JNI calls or so. I'm also not sure how one would take the OpenGL view and draw it so parts of it are transparent, or whether there's a way to make windows of two apps move as one together, but at least it's a direction worth investigating.

Alternately, would it be possible to put all your non-Java code in a JNI library and have the Java app load and call that? You'd merge both apps into one, and thus avoid the issue of one not having access to the other's window.

Cheers,
-- Uli Kusterer
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de





_______________________________________________
Do not post admin requests to the list. They will be ignored.
Mac-opengl mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/mac-opengl/email@hidden

This email sent to email@hidden
References: 
 >inter process NSView sharing (From: "Jonathan Cochrane" <email@hidden>)



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

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.