@Override public AudioRenderer newAudioRenderer(AppSettings settings) { initialize(settings); AL al; ALC alc; EFX efx; if (settings.getAudioRenderer().startsWith("LWJGL")) { al = newObject("com.jme3.audio.lwjgl.LwjglAL"); alc = newObject("com.jme3.audio.lwjgl.LwjglALC"); efx = newObject("com.jme3.audio.lwjgl.LwjglEFX"); } else if (settings.getAudioRenderer().startsWith("JOAL")) { al = newObject("com.jme3.audio.joal.JoalAL"); alc = newObject("com.jme3.audio.joal.JoalALC"); efx = newObject("com.jme3.audio.joal.JoalEFX"); } else { throw new UnsupportedOperationException( "Unrecognizable audio renderer specified: " + settings.getAudioRenderer()); } if (al == null || alc == null || efx == null) { return null; } return new ALAudioRenderer(al, alc, efx); }
@Override public JmeContext newContext(AppSettings settings, Type contextType) { initialize(settings); JmeContext ctx; if (settings.getRenderer() == null || settings.getRenderer().equals("NULL") || contextType == JmeContext.Type.Headless) { ctx = new NullContext(); ctx.setSettings(settings); } else if (settings.getRenderer().startsWith("LWJGL")) { ctx = newContextLwjgl(settings, contextType); ctx.setSettings(settings); } else if (settings.getRenderer().startsWith("JOGL")) { ctx = newContextJogl(settings, contextType); ctx.setSettings(settings); } else if (settings.getRenderer().startsWith("CUSTOM")) { ctx = newContextCustom(settings, contextType); ctx.setSettings(settings); } else { throw new UnsupportedOperationException( "Unrecognizable renderer specified: " + settings.getRenderer()); } return ctx; }
@Override public AudioRenderer newAudioRenderer(AppSettings settings) { initialize(settings); AL al; ALC alc; EFX efx; if (settings.getAudioRenderer().startsWith("LWJGL")) { al = newObject("com.jme3.audio.lwjgl.LwjglAL"); alc = newObject("com.jme3.audio.lwjgl.LwjglALC"); efx = newObject("com.jme3.audio.lwjgl.LwjglEFX"); } else if (settings.getAudioRenderer().startsWith("JOAL")) { al = newObject("com.jme3.audio.joal.JoalAL"); alc = newObject("com.jme3.audio.joal.JoalALC"); efx = newObject("com.jme3.audio.joal.JoalEFX"); } else { throw new UnsupportedOperationException( "Unrecognizable audio renderer specified: " + settings.getAudioRenderer()); } if (al == null || alc == null || efx == null) { return null; } return new ALAudioRenderer(al, alc, efx); }
@Override public JmeContext newContext(AppSettings settings, Type contextType) { initialize(settings); JmeContext ctx; if (settings.getRenderer() == null || settings.getRenderer().equals("NULL") || contextType == JmeContext.Type.Headless) { ctx = new NullContext(); ctx.setSettings(settings); } else if (settings.getRenderer().startsWith("LWJGL")) { ctx = newContextLwjgl(settings, contextType); ctx.setSettings(settings); } else if (settings.getRenderer().startsWith("JOGL")) { ctx = newContextJogl(settings, contextType); ctx.setSettings(settings); } else if (settings.getRenderer().startsWith("CUSTOM")) { ctx = newContextCustom(settings, contextType); ctx.setSettings(settings); } else { throw new UnsupportedOperationException( "Unrecognizable renderer specified: " + settings.getRenderer()); } return ctx; }