예제 #1
0
        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();
            }
        }
예제 #2
0
        protected virtual void DrawInitialize()
        {
            Window.MakeCurrent();
            GLWrapper.Initialize(this);

            setVSyncMode();
        }
예제 #3
0
        protected virtual void DrawInitialize()
        {
            Window.MakeCurrent();
            GLWrapper.Initialize(this);

            setVSyncMode();

            GLWrapper.Reset(new Vector2(Window.ClientSize.Width, Window.ClientSize.Height));
            GLWrapper.ClearColour(Color4.Black);
        }
예제 #4
0
        protected virtual void DrawInitialize()
        {
            Window.MakeCurrent();
            GLWrapper.Initialize(this);

            if (Window != null)
            {
                Window.VSync = VSyncMode.Off;
            }
        }
예제 #5
0
        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));
            }
        }
예제 #6
0
        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();
            }
        }