Gouraud Shading, Flat Shading question

Hi,

I wonder what kind a shading douse Jme use . is it flat shading?

is there a way to control that ? line in jogl (gl.glShadeModel(GL.GL_SMOOTH) or GL_FLAT )

 

thanks

Moshe

O.k i've found the answer to my question (I missed it in the previous search)


ShadeState st = new LWJGLShadeState();
st.setShade(ShadeState.SM_FLAT);
st.setEnabled(true);
rootNode.setRenderState(st);
rootNode.updateRenderState();



But i'm not sure it's working , i've put it in the init function.
is this the right way?
Moshe

O.k it works fine, I used a Torus and I can see the differance.

jME uses smooth shading by default but you can change it with a ShadeState like in your 2nd post.

Though using RenderState implementation constructors is not wise I think. You should create them using the factory methods Renderer.createXYState().

Refer to the getting started guide for more info.