*/
private int doHeadlessRender() {
System.setProperty("java.awt.headless", "true");
RenderContext renderContext = new RenderContext(options);
RenderManager renderManager = new RenderManager(
new PlaceholderRenderCanvas(),
renderContext, new ConsoleRenderListener(), true);
try {
renderManager.loadScene(options.sceneName);
if (options.target != -1) {
renderManager.scene().setTargetSPP(options.target);
}
renderManager.scene().goHeadless();
renderManager.start();
return 0;
} catch (FileNotFoundException e) {
System.err.println("Scene \"" + options.sceneName + "\" not found!");
renderManager.interrupt();
return 1;
} catch (IOException e) {
System.err.println("IO error while loading scene (" + e.getMessage() + ")");
renderManager.interrupt();
return 1;
} catch (SceneLoadingError e) {
System.err.println("Scene loading error (" + e.getMessage() + ")");
renderManager.interrupt();
return 1;
} catch (InterruptedException e) {
System.err.println("Interrupted while loading scene");
renderManager.interrupt();
return 1;
}
}