// Initialize/Start DAE internal static void Start() { rootBuffer = new CBuffer(new IVector(0, 0)); rootCanvas = new RootCanvas(rootBuffer, RenderTarget.defaultRenderTarget); DWindow window = new DWindow(); window.ProcessEvents(); window.RenderFrameToScreen(); // Initialize the static Graphics class Graphics.Initialize(); // Clear out the screen (make sure it's not white when we start up the window) (Burns my eyes) GL.ClearColor(0, 0, 0, 1); GL.Clear(ClearBufferMask.ColorBufferBit | ClearBufferMask.DepthBufferBit); window.Title = "LOADING ..."; window.RenderFrameToScreen(); window.Title = "LOADING PLUGINS ..."; // Initialize PluginSystem PluginSystem.LoadPluginsFromAssembly(Assembly.GetExecutingAssembly()); PluginSystem.LoadDllsFromPath(Util.CurrentPath + "Plugins/"); window.Title = "LOADING START-UP SCRIPT..."; Loader.PrepareScript(); Loader.Run(); Foo foo = new Foo(new IVector(30, 20)); rootCanvas.AddComponent(foo); Button b1 = new Button(new IVector(15, 5)); b1.position += 1; foo.AddComponent(b1); Button b2 = new Button(new IVector(15, 5)); b2.position = b1.Size + 1; foo.AddComponent(b2); Time.OnSecond += OnSecond; window.Title = "Dae"; IsRunning = true; logicTickThread = new Thread(TickLoop); logicTickThread.Start(); // Enter the main loop Run(); // Actually shutdown/free DAE from the system (GPU, Hooks & Memory) Shutdown(); }