def calcSize(self): width, height = (0, 0) for win in self.windows: w, h = dgui.get_window_size(self[win]) width = max(width, w) height = max(height, h) self._width = None if width == 0 else width self._height = None if height == 0 else height
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]