Poly Support?

Just wondering, is there a reason the JMonkeyEngine doesn’t support glPolygonMode? Is it because of how the mesh buffer system works or what?
Because I’ve got some spare time on my hands, and that could be an interesting feature.

We use it under the hood already for filling and wirefame support

See mesh.setMode(Mode)

@wezrule said: We use it already for filling and wirefame support

Oh?
In that case, how would one go about constructing a mesh based off non-triangular polygons? Because I’m implementing CSG (ported from an MIT licensed project), but all the triangulators are licensed under stricter licenses.

@nehon said: See mesh.setMode(Mode)

Does this have a poly mode? It doesn’t appear to have it.

You can acces those with the extendedREdnerSTates from material

bg.getAdditionalRenderState().setFaceCullMode(FaceCullMode.Off);
The you can set there to force wireframe rendering as well.

The rest is in the mesh where you can define the meshmode (eg line, triangle, ect)

@Empire Phoenix said: You can acces those with the extendedREdnerSTates from material

bg.getAdditionalRenderState().setFaceCullMode(FaceCullMode.Off);
The you can set there to force wireframe rendering as well.

The rest is in the mesh where you can define the meshmode (eg line, triangle, ect)

I know how to turn face cull mode to off, but what if I had a polygon with say, 5 vertices? Alot of the polygons produced have in excess of 5 vertices, and mesh modes only seem to support up to 3…

Edit; I’m not sure glPolygonMode is what I’m meaning, but I’m pretty sure OpenGL has capabilities for rendering polygons with variable vertex counts. Doesn’t it?

Edit 2: Crisis averted. Triangle fan mode will do.

Whole computer grafics is optimized for triangles, others might work but are way slower.