/** * Create a standard NiftyJmeDisplay. This uses the old Nifty renderer. It's probably slower then the batched * renderer and is mainly here for backwards compatibility. * * @param assetManager jME AssetManager * @param inputManager jME InputManager * @param audioRenderer jME AudioRenderer * @param vp Viewport to use */ public NiftyJmeDisplay(AssetManager assetManager, InputManager inputManager, AudioRenderer audioRenderer, ViewPort vp){ initialize(assetManager, inputManager, audioRenderer, vp); this.renderDev = new RenderDeviceJme(this); this.batchRendererBackend = null; nifty = new Nifty(renderDev, soundDev, inputSys, new AccurateTimeProvider()); inputSys.setNifty(nifty); resourceLocation = new ResourceLocationJme(); nifty.getResourceLoader().removeAllResourceLocations(); nifty.getResourceLoader().addResourceLocation(resourceLocation); }
private NiftyJmeDisplay( final AssetManager assetManager, final InputManager inputManager, final AudioRenderer audioRenderer, final ViewPort viewport, final BatchRenderConfiguration batchRenderConfiguration) { initialize(assetManager, inputManager, audioRenderer, viewport); this.renderDev = null; this.batchRendererBackend = new JmeBatchRenderBackend(this); nifty = new Nifty( new BatchRenderDevice(batchRendererBackend, batchRenderConfiguration), soundDev, inputSys, new AccurateTimeProvider()); inputSys.setNifty(nifty); resourceLocation = new ResourceLocationJme(); nifty.getResourceLoader().removeAllResourceLocations(); nifty.getResourceLoader().addResourceLocation(resourceLocation); }
nifty.getResourceLoader().addResourceLocation(resourceLocation);