JNI + LWJGL + JME

Started by crbs, November 15, 2008, 03:56:39

Previous topic - Next topic

crbs



I am trying to integrate come JNI (C++) openGL code with a JME (LWJGL) application.

My situation is:
We have an application developed on the JME engine.
JME uses LWJGL.
A colleague has developed an openGL application in C++ which I have made a JNI implimentation of using an AWT Canvas.

My confusion comes on how to pass the same openGL context/reference/canvas which JME uses over to the JNI.
I have stumbled on the getCanvas() method from StandardGame, but it would appear that this is not a supported feature because nothing uses this canvas (a look at the source reveals the canvas is never created)
I have also stumbled on the useContext() in GlContext.java (of LWJGL), in which case, could I use something to the effect of useContext(myStandardGame) ?

I know some of this is beyond the scope of this forum, but I'm looking for whatever insight. Even without an answer, any other guiding thoughts would be appreciated.

Matzon


crbs

I had actually already seen that post before posting myself,
That's very related, but different. In my situation JME is creating the GL instance, I then want to pass that instance off - whereas the other poster was doing the converse. Thank you, though.