I'm having some problems trying to render GL11.xxx directly in jme.
For now I have an Class extends Geometry, and implements draw() method.
I would like to know the best way to render lines, points and triangles.
Thank you.
Is there anything about the solution you use now that's not to your liking? There's no real specific mechanism for this in jME at the moment.
Ok, llama answered me
I'll explain a little bit better my problem:
I'm writing a class called JPhysXDebugRenderer which use GL11 calls based on the Lesson 301: Debug Renderer from Ageia's support.
This class is JME independent, only depends on LWJGL.
Then I create a class called JPhysXJMEDebugRenderer (extends Geometry) to render in JME.
On the public void draw() method I run the JPhysXDebugRenderer.renderData().
I was hoping that JME had something ready for this case, but it would go against the principle of abstracting the renderer.
I'll try to do it using only JME.
Thanks!
Take a look at ImageGraphics and LWJGLImageGraphics, that's one way of handeling abstraction…
Ok… I managed it to work by extending the LWJGLRenderer.
One last issue. It doesn't render anything unless I have at least one Box (or any other standard shape) attached to the rootNode.
<edit> The Box MUST be attached before my JPhysXDebugNode (extends Geometry) otherwise it doens't show either. </edit>
Looks like I'm missing some call to allow the renderer to work. Does anyone knows something about this?
Thanks