Rendering to a JPanel for an Eclipse RCP project

I’m hoping to use the JME in an Eclipse RCP project and I was wondering if this was possible. The project I’m working on needs to have a 3D rendering environment in a single panel on the Eclipse RCP gui. The rest other panels on the GUI are reserved for buttons, a text editor, etc. Does anyone know of an easy way to have the JME render to a JPanel which I could then encapsulate in an RCP plugin?



The closest I have found is the Monklypse project but this only supports JME2 and I’ve had some problems loading models in it. I was hoping that switching to JME3 would solve many of these issues as it seems more stable and easier to use.



Any help would be greatly appreciated. Thanks.

Eclipse RPC uses the nonstandard SWT GUI for which no direct support exists in lwjgl and jME3. You can try and simply paint the render buffer to a SWT panel if you know how to handle them. Look at TestRenderToMemory to get an idea on how to do that.

This was asked before … It is definitely possible, but requires some skill to do. Here’s some code for jME2 that does it:

http://code.google.com/p/jmonkeyengine/source/browse/trunk/src/com/jmex/swt/lwjgl/LWJGLSWTCanvas.java?spec=svn4029&r=4029

If you want, you can port this to jME3 … should be fairly easy I think, assuming you know what you’re doing.