예제 #1
0
        void Run()
        {
            Application.Application app = m_pipeline.Application;

            app.Resize += Resize;

            StartUp(app);

            m_graphics.Init();

            IntPtr graphicsHandle = ((NativeGraphics)m_graphics.InternalGraphics).Handle;

            while (!m_shutDown)
            {
                if (Pipeline_PreUpdate(m_handle, graphicsHandle))
                {
                    m_time.Update();

                    m_graphics.Update();

                    Pipeline_PostUpdate(m_handle, graphicsHandle);
                }
            }

            m_graphics.Dispose();

            Pipeline_delete(m_handle);

            m_joinable = true;
        }
예제 #2
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;
        }