final IndexBufferData<?> indices = BufferUtils.createIndexBufferData(10, 7);
indices.put(new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 0, 1 });
mesh.getMeshData().setIndices(indices);
// set up alpha blending.
final BlendState blend = new BlendState();
blend.setBlendEnabled(true);
blend.setSourceFunction(SourceFunction.SourceAlpha);
blend.setDestinationFunction(DestinationFunction.OneMinusSourceAlpha);
mesh.setRenderState(blend);
// use flat shade so our borders will have a solid color.
final ShadingState shading = new ShadingState();
shading.setShadingMode(ShadingMode.Flat);