Beispiel #1
0
        public void StartGraphicEngine()
        {
            if (!Engine.isEngineRunning)
            {

                UISettings settings = new UISettings();

                if (settings.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                {
                    // init the engine
                    engine = new Engine(1680, 1050, this);

                    // setup the input
                    engine.SetupInput(this);

                    // start the render
                    engine.StartRender();
                }
            }
        }
Beispiel #2
0
        private void start3d_Click(object sender, EventArgs e)
        {
            if (!Engine.isEngineRunning)
            {

                UISettings settings = new UISettings();

                if (settings.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                {

                    // init the engine
                    //engine = new Engine(RenderArea.Width, RenderArea.Height, RenderArea.Handle, this.Handle);
                    engine = new Engine(1680, 1050, this);

                    // set the first viewport
                    RenderArea_Viewport = new GraphicsEngine.Core.Viewport(RenderArea.Width, RenderArea.Height, RenderArea.Handle, Format.R8G8B8A8_UNorm);
                    ViewportManager.AddViewport(RenderArea_Viewport);
                    /*
                    // set the second viewport
                    RenderArea_Viewport2 = new GraphicsEngine.Core.Viewport(RenderArea2.Width, RenderArea2.Height, RenderArea2.Handle, Format.R8G8B8A8_UNorm);
                    ViewportManager.AddViewport(RenderArea_Viewport2);
                    */
                    // set the moving camera
                    Engine.g_MoveCamera = RenderArea_Viewport.m_Camera;

                    // setup the input
                    engine.SetupInput(this);

                    // start the render
                    engine.StartRender();
                }
            }
        }