use of org.terasology.engine.subsystem.headless.renderer.HeadlessCanvasRenderer in project Terasology by MovingBlocks.
the class HeadlessGraphics method postInitialise.
@Override
public void postInitialise(Context context) {
context.put(RenderingSubsystemFactory.class, new HeadlessRenderingSubsystemFactory());
HeadlessDisplayDevice headlessDisplay = new HeadlessDisplayDevice();
context.put(DisplayDevice.class, headlessDisplay);
initHeadless(context);
context.put(CanvasRenderer.class, new HeadlessCanvasRenderer());
}
use of org.terasology.engine.subsystem.headless.renderer.HeadlessCanvasRenderer in project Terasology by MovingBlocks.
the class ContextMenuUtilsTest method setupInput.
@BeforeClass
public static void setupInput() {
context.put(InputSystem.class, new InputSystem());
context.put(TranslationSystem.class, new TranslationSystemImpl(context));
context.put(CanvasRenderer.class, new HeadlessCanvasRenderer());
context.put(NUIManager.class, new NUIManagerInternal(context.get(CanvasRenderer.class), context));
File file = new File(ContextMenuUtilsTest.class.getClassLoader().getResource("contextMenuBuilderInput.ui").getFile());
String content = null;
try {
content = Files.toString(file, Charsets.UTF_8);
} catch (IOException e) {
fail("Could not load input file");
}
inputTree = JsonTreeConverter.serialize(new JsonParser().parse(content));
}
Aggregations