You can use JOGL 2 on top of NEWT (the AWT-less windowing/event/input toolkit that was developed alongside JOGL 2), no native code required. On Mac OS X, it is necessary to pass "-XstartOnFirstThread -Djava.awt.headless=true" to ensure proper startup/threading behavior.
We used JOGL 2 and NEWT successfully in developing the new graphics stack for JavaFX (including on Mac OS X). I don't recall whether we ever experimented with running it on a bsd-port build, but it should just work assuming the -XstartOnFirstThread logic was included in the bsd-port tree, and I think it was integrated in late 2008: http://markmail.org/message/ukpoambmlttcm7sg Anyway, I think you'd be better off directing your questions to the JOGL forums on javagaming.org... Here's a relevant thread: http://www.javagaming.org/index.php/topic,20625.0.html Chris On Feb 10, 2010, at 11:50 AM, Joshua Marinacci wrote: > hmm. sounds like some custom JNI code that I'd need to write to get GL up and > running. > On Wed Feb 10, 2010, at 11:49 AM, Mike Swingler wrote: > >> On Mac OS X, you still need a Cocoa window to hang your OpenGL context onto. >> How that window is managed from Java is...well...unclear without the AWT. >> Also, your game would have to accept keyboard and mouse input...so there >> would have to be something to handle that as well. >> >> Mike Swingler >> Java Runtime Engineer >> Apple Inc. >> >> On Feb 10, 2010, at 10:53 AM, Joshua Marinacci wrote: >> >>> Hey David. Long time, no hear. :) >>> >>> Yeah, there are a few AWT classes I'm using for off screen rendering, so >>> doing the headless toolkit makes sense. So if I do that then I no longer >>> have any dependencies on X11, right? >>> >>> Has anyone here worked with JOGL? I know the latest beta releases have >>> hooks for a new windowing toolkit so that we don't need AWT, but in my >>> simple tests I wasn't able to make use of it. >>> >>> On Wed Feb 10, 2010, at 10:50 AM, David Herron wrote: >>> >>>> A thought -- Use the AWT headless toolkit and that is supposed to turn off >>>> any on-screen GUI stuff. But it would mean ensuring the 3D stuff you >>>> create would be done via other means than the AWT infrastructure. >>>> >>>> IIRC There are other things which will trigger AWT into action. Using the >>>> headless toolkit will cause the system to instead throw exceptions that >>>> will tell you which methods are safe or not. You can also inspect methods >>>> and classes to see which throw HeadlessException and which don't. >>>> >>>> On Wed, Feb 10, 2010 at 9:43 AM, Joshua Marinacci <jos...@marinacci.org> >>>> wrote: >>>> >>>> Hi guys. I was wondering if anyone has tried the following, or has >>>> thoughts on how difficult it would be to implement. >>>> >>>> Would it be possible to run OpenJDK on Mac OSX outside of the X11 layer >>>> provided the app only opened a JOGL window rather than an AWT or Swing >>>> window? Would just not opening a JFrame do it or are there other things >>>> hidden in the runtime which would trigger the AWT layer, and therefore >>>> require X11? >>>> >>>> My end goal is to write a 3D game that can have the JRE distributed with >>>> the app. >> > > _______________ > Josh Marinacci > JoshOnDesign.com > > >