private void drawLoop() { GLControl.Initialize(); GLWrapper.Initialize(); while (!exitRequested) { DrawMonitor.NewFrame(DrawClock); using (DrawMonitor.BeginCollecting(PerformanceCollectionType.Draw)) { GLWrapper.Reset(Size); GL.Clear(ClearBufferMask.ColorBufferBit | ClearBufferMask.DepthBufferBit); pendingRootNode?.DrawSubTree(); } using (DrawMonitor.BeginCollecting(PerformanceCollectionType.SwapBuffer)) { GLControl.SwapBuffers(); GLControl.Invalidate(); } using (DrawMonitor.BeginCollecting(PerformanceCollectionType.Sleep)) DrawClock.ProcessFrame(); } }
protected virtual void DrawInitialize() { Window.MakeCurrent(); GLWrapper.Initialize(this); setVSyncMode(); }
protected virtual void DrawInitialize() { Window.MakeCurrent(); GLWrapper.Initialize(this); setVSyncMode(); GLWrapper.Reset(new Vector2(Window.ClientSize.Width, Window.ClientSize.Height)); GLWrapper.ClearColour(Color4.Black); }
protected virtual void DrawInitialize() { Window.MakeCurrent(); GLWrapper.Initialize(this); if (Window != null) { Window.VSync = VSyncMode.Off; } }
protected sealed override void OnInitialize() { var window = host.Window; if (window != null) { window.MakeCurrent(); GLWrapper.Initialize(host); GLWrapper.Reset(new Vector2(window.ClientSize.Width, window.ClientSize.Height)); } }
private void drawLoop() { GLControl?.Initialize(); GLWrapper.Initialize(); while (!ExitRequested) { DrawMonitor.NewFrame(); DrawFrame(); using (DrawMonitor.BeginCollecting(PerformanceCollectionType.SwapBuffer)) GLControl?.SwapBuffers(); using (DrawMonitor.BeginCollecting(PerformanceCollectionType.Sleep)) DrawClock.ProcessFrame(); } }