Beispiel #1
0
        void Run()
        {
            OpenTKApplication app = m_pipeline.Application.InternalApplication as OpenTKApplication;

            StartUp(app);
            m_graphicsPipeline.Init();

            while (!m_shutDown)
            {
                m_time.Update();

                Input();
                Disposal();

                if (app.WindowState != WindowState.Minimized)
                {
                    Update(app);
                }
                else
                {
                    Thread.Yield();
                }
            }

            m_graphicsPipeline.Dispose();
            m_consoleDisplay.Dispose();

            while (!m_destroy || !m_disposalQueue.IsEmpty)
            {
                Disposal();
            }

            GL.DeleteBuffer(m_staticIBO);
            GL.DeleteBuffer(m_staticVBO);
            GL.DeleteVertexArray(m_staticVAO);

            m_joinable = true;
        }