Renderer.applyDefaultStates(); MaterialState.resetCurrents(); ((LWJGLRenderer)display.getRenderer()).reset();
    public void deactivate() {        if (!isSupported) {            return;        }        if (active == 1) {            try {                if (!headless && Display.isCreated())                    Display.makeCurrent();                else if (display.getCurrentCanvas() != null)                    ((LWJGLCanvas)display.getCurrentCanvas()).makeCurrent();                else if (display.getHeadlessDisplay() != null)                    display.getHeadlessDisplay().makeCurrent();            } catch (LWJGLException e) {                e.printStackTrace(); // To change body of catch statement use                // File | Settings | File Templates.                throw new JmeException();            }        }        active--;    }