示例#1
0
        void PopulateViewports(MgPipelineViewportStateCreateInfo viewportState)
        {
            if (viewportState != null)
            {
                Viewports = new GLCmdViewportParameter(0, viewportState.Viewports);
                Scissors  = new GLCmdScissorParameter(0, viewportState.Scissors);
            }
            else
            {
                // Should be 0,0 (width, height)
                Viewports = new GLCmdViewportParameter(0,
                                                       new MgViewport [] {
                    //new MgViewport{ X = 0, Y = 0, Width = 0, Height = 0 }
                }
                                                       );
                //
                Scissors = new GLCmdScissorParameter(0,
                                                     new MgRect2D [] {
//						new MgRect2D
//						{
//							Offset = new MgOffset2D{ X = 0, Y = 0},
//							Extent = new MgExtent2D{Width = 0, Height = 0 },
//						}
                }
                                                     );
            }
        }
示例#2
0
        public void ApplyViewports(GLCmdViewportParameter viewports)
        {
            GL.ViewportArray(viewports.Viewport.First, viewports.Viewport.Count, viewports.Viewport.Values);

            mErrHandler.LogGLError("ApplyViewports.ViewportArray");

            GL.DepthRangeArray(viewports.DepthRange.First, viewports.DepthRange.Count, viewports.DepthRange.Values);

            mErrHandler.LogGLError("ApplyViewports.DepthRangeArray");
        }
示例#3
0
 public void ApplyViewports(GLCmdViewportParameter viewports)
 {
 }