Hi.
I’m trying to use jME in a plugin architecture (XBMC). To create a visualisation that renders in the background.
I am kind of bridging the gap between a XBMC’s C++ plugin system and jME. JNI bridged this initial gap quite well.
XBMC creates and initialises the OpenGL context. I finally found GLContext.loadOpenGLLibrary and GLContext.useContext and it appears to initialise lwjgl properly now.
But the call to the “SimpleApplication.start” is causing jME to create a window. I need to to use whatever XBMC provides, the existing OpenGL context and whatever the window is.
XBMC does provide width and height, and whatever window jME creates is to those specifications, it’s just an external window to the XBMC container.
I extended LwjglDisplay, I was hoping I could intervene in the “createContext” call to prevent the “Display” from creating a window, but I don’t know how to tell it to stop creating a window, or what calls to use to initialise lwjgl to use the existing context / drawing surface.
Looking at existing XBMC (C++) visualisations, they don’t manage OpenGL, so I don’t think any “JmeContext” needs to manage recreation of contexts, it looks like it should be managed by XBMC. And it is very eager at destroying plugins too.
(The version of jME I am using is 3.0.0beta, I am kinda stuck to that version as it is a 3rd-party extension of jME) I don’t know if this is a lwjgl or jME thing anyway.
(I also need at some point to stop telling it be multi-threaded as there is a “render” call from XBMC that tells the system to render I believe.)