def setup(): ui.init() renderStacks = [] windows = [] for idx, winData in enumerate(WINDOWS): renderStack = ui.RenderStack() renderStack.display = ui.Display(resolution=winData['size']) share = None if idx == 0 else windows[0] window = renderStack.addWindow( ui.open_window(winData['name'], winData['location'][0], winData['location'][1], renderStack.display.width, renderStack.display.height, share=share)) if not window: ui.terminate() exit(1) ui.make_context_current(window) dg.initGL() windows.append(window) renderStacks.append(renderStack) ui.add_key_callback(ui.close_window, ui.KEY_ESCAPE) scene = loadScene(renderStacks) for rs in renderStacks: rs.graphicsCardInit() return renderStacks, scene, windows
def setup(): winData = WINDOWS[0] renderStack = ui.RenderStack() renderStack.display = ui.Display(resolution=winData['size']) ui.init() mainWindow = renderStack.addWindow(ui.open_window(winData['name'], winData['location'][0], winData['location'][1], renderStack.display.width, renderStack.display.height)) if not mainWindow: ui.terminate() exit(1) ui.make_context_current(mainWindow) ui.add_key_callback(ui.close_window, ui.KEY_ESCAPE) scenes = [loadScene(renderStack) for renderStack in renderStacks] for rs in renderStacks: rs.graphicsCardInit() return renderStacks, scenes, windows
def setup(): renderGraph = dgr.RenderGraph('Test1_RG') display = renderGraph.add(dgui.Display('Fake Display',resolution=(1920,1200))) dgui.init() offset = (0,0) mainWindow = renderGraph.add(dgui.open_window('Scene Graph Test', offset[0], offset[1], display.width, display.height)) if not mainWindow: dgui.terminate() exit(1) x, y = dgui.get_window_pos(mainWindow) width, height = dgui.get_window_size(mainWindow) dgui.add_key_callback(dgui.close_window, dgui.KEY_ESCAPE) dg.initGL() scene = loadScene(renderGraph) renderGraph.graphicsCardInit() return scene, [mainWindow]
def setup(): renderStack = ui.RenderStack() renderStack.display = ui.Display() ui.init() offset = (0,0) mainWindow = renderStack.addWindow(ui.open_window('Warp Distortion Test', offset[0], offset[1], renderStack.display.width, renderStack.display.height)) if not mainWindow: ui.terminate() exit(1) x, y = ui.get_window_pos(mainWindow) width, height = ui.get_window_size(mainWindow) ui.add_key_callback(ui.close_window, ui.KEY_ESCAPE) dg.initGL() scene = loadScene(renderStack) renderStack.graphicsCardInit() return renderStack, scene, [mainWindow]
def setup(): dgui.init() renderGraph = dgr.RenderGraph('TestMTL_RG') monitors = dgui.get_monitors() display = renderGraph.add(dgui.Display('Last', monitors[0])) offset = display.screenPosition mainWindow = renderGraph.add( dgui.open_window('Render Graph Test', offset[0], offset[1], display.width, display.height)) if not mainWindow: dgui.terminate() exit(1) x, y = dgui.get_window_pos(mainWindow) width, height = dgui.get_window_size(mainWindow) dgui.add_key_callback(dgui.close_window, dgui.KEY_ESCAPE) dg.initGL() scene = loadScene(renderGraph) renderGraph.graphicsCardInit() return renderGraph, [mainWindow]