Exemplo n.º 1
0
        static void Main()
        {
            // Create Our Own Form
            SapphireForm Form = new SapphireForm();

            // Show Everthing On the Form
            Form.Show();

            // Send Our Handle To D3D Engine Side
            _InitializeD3D(Form.graphicsPanel1.Handle.ToInt32(), Form.graphicsPanel1.Width, Form.graphicsPanel1.Height);

            // Set Our Post Process Combo Box to "No Effect"
            Form.PostProcessComboBox.SelectedIndex = 0;
            _TogglePostProcess(Form.PostProcessCheckBox.Checked);
            // Loop While We Have a Form
            while (Form.Created)
            {
                // Do All The Events Within The Application
                Application.DoEvents();

                // Update our Engine
                _UpdateD3D();

                // Render our Engine
                _RenderD3D();

                // Display FrameRate Onto the Form Using our GetFPS() Function
                Form.FramesPerSecond.Text = Convert.ToString(_GetFPS());
            }
        }
Exemplo n.º 2
0
        static void Main()
        {
            // Create Our Own Form
            SapphireForm Form = new SapphireForm();

            // Show Everthing On the Form
            Form.Show();

            // Send Our Handle To D3D Engine Side
            _InitializeD3D( Form.graphicsPanel1.Handle.ToInt32(), Form.graphicsPanel1.Width, Form.graphicsPanel1.Height );

            // Set Our Post Process Combo Box to "No Effect"
            Form.PostProcessComboBox.SelectedIndex = 0;
            _TogglePostProcess(Form.PostProcessCheckBox.Checked);
            // Loop While We Have a Form
            while (Form.Created)
            {
                // Do All The Events Within The Application
                Application.DoEvents();

                // Update our Engine
                _UpdateD3D();

                // Render our Engine
                _RenderD3D();

                // Display FrameRate Onto the Form Using our GetFPS() Function
                Form.FramesPerSecond.Text = Convert.ToString(_GetFPS());
            }
        }