@Override
    public void renderQuad(int x, int y, int width, int height, Color color) {
        //We test for alpha >0 as an optimization to prevent the render of completely transparent quads.
        //Nifty layers are often used for logical positioning and not rendering.
        //each layer is rendered as a quad, but that can bump up the number of geometry rendered by a lot.
        //Since we disable depth write, there is absolutely no point in rendering those quads
        //This optimization can result in a huge performance increase on complex Nifty UIs.
        if(color.getAlpha() >0){
            colorMaterial.setColor("Color", convertColor(color, tempColor));

            tempMat.loadIdentity();
            tempMat.setTranslation(x, getHeight() - y, 0);
            tempMat.setScale(width, height, 0);

            rm.setWorldMatrix(tempMat);
            rm.setForcedRenderState(renderState);
            colorMaterial.render(quadGeom, rm);
        }

        //System.out.format("renderQuad1(%d, %d, %d, %d, %s)\n", x, y, width, height, color.toString());
    }
Instantiates a new RenderDevice using the specified ColorSpace for Nifty
colors.

@param display the SceneProcessor to render Nifty (not null, alias created)
@param colorSpace the ColorSpace to use for Nifty colors (sRGB or Linear)
jme3-niftygui/src/main/java/com/jme3/niftygui/RenderDeviceJme.java