Viewport() private method

private Viewport ( int x, int y, int width, int height ) : void
x int
y int
width int
height int
return void
Exemplo n.º 1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="e"></param>
        protected override void OnSizeChanged(EventArgs e)
        {
            base.OnSizeChanged(e);

            int width = this.Width, height = this.Height;

            if (width > 0 && height > 0)
            {
                FBORenderContext renderContext = this.renderContext;
                if (renderContext != null)
                {
                    renderContext.MakeCurrent();

                    renderContext.SetDimensions(width, height);

                    OpenGL.Viewport(0, 0, width, height);

                    if (this.designMode)
                    {
                        GLCanvasHelper.ResizeGL(width, height);
                    }

                    this.Invalidate();
                }
            }
        }
Exemplo n.º 2
0
        protected override void OnSizeChanged(EventArgs e)
        {
            base.OnSizeChanged(e);

            RenderContext renderContext = this.renderContext;

            if (renderContext != null)
            {
                renderContext.MakeCurrent();

                renderContext.SetDimensions(this.Width, this.Height);

                OpenGL.Viewport(0, 0, this.Width, this.Height);

                this.Invalidate();
            }
        }
Exemplo n.º 3
0
 protected override void SwitchOff()
 {
     OpenGL.Viewport(original[0], original[1], original[2], original[3]);
 }
Exemplo n.º 4
0
        protected override void SwitchOn()
        {
            OpenGL.GetInteger(GetTarget.Viewport, original);

            OpenGL.Viewport(X, Y, Width, Height);
        }