Inheritance: System.Windows.Forms.Form
示例#1
0
        private void OnFullscreenButtonClick(object sender, EventArgs e)
        {
            // Create a full screen window.
            FullScreenWindow fullScreenWindow = new
                                                FullScreenWindow(ref renderer, ref camera,
                                                                 ref animationController,
                                                                 ref glControlMain,
                                                                 FIELD_OF_VIEW, NEAR_PLANE, FAR_PLANE);

            // Display it.
            fullScreenWindow.ShowDialog(this);

            // The full screen context makes itself the current context
            // for OpenGL.  So, when it's done being shown, we need to make
            // the original form the current context and redraw it.
            glControlMain.Context.MakeCurrent(glControlMain.WindowInfo);

            // Send a resize message to update the camera and renderer.
            GLControlMainOnResize(null, null);

            // Redraw
            glControlMain.Invalidate();
        }
示例#2
0
        private void OnFullscreenButtonClick(object sender, EventArgs e)
        {
            // Create a full screen window.
            FullScreenWindow fullScreenWindow = new
                FullScreenWindow(ref renderer, ref camera,
                ref animationController,
                ref glControlMain,
                FIELD_OF_VIEW, NEAR_PLANE, FAR_PLANE);

            // Display it.
            fullScreenWindow.ShowDialog(this);

            // The full screen context makes itself the current context
            // for OpenGL.  So, when it's done being shown, we need to make
            // the original form the current context and redraw it.
            glControlMain.Context.MakeCurrent(glControlMain.WindowInfo);

            // Send a resize message to update the camera and renderer.
            GLControlMainOnResize(null, null);

            // Redraw
            glControlMain.Invalidate();
        }