コード例 #1
0
 public void Reset(FrameBuffer screen)
 {
     this.Enable           = EnableMode.Dither;
     this.Scissor          = new ImageRect(0, 0, screen.Width, screen.Height);
     this.Viewport         = new ImageRect(0, 0, screen.Width, screen.Height);
     this.DepthRange       = new Vector2(0f, 1f);
     this.ClearColor       = new Vector4(0f, 0f, 0f, 0f);
     this.ClearDepth       = 1f;
     this.ClearStencil     = 0;
     this.CullFace         = new CullFace(CullFaceMode.Back, CullFaceDirection.Ccw);
     this.BlendFuncRgb     = new BlendFunc(BlendFuncMode.Add, BlendFuncFactor.One, BlendFuncFactor.Zero);
     this.BlendFuncAlpha   = this.BlendFuncRgb;
     this.DepthFunc        = new DepthFunc(DepthFuncMode.Less, true);
     this.PolygonOffset    = new PolygonOffset(0f, 0f);
     this.StencilFuncFront = new StencilFunc(StencilFuncMode.Always, 0, 255, 255);
     this.StencilOpFront   = new StencilOp(StencilOpMode.Keep, StencilOpMode.Keep, StencilOpMode.Keep);
     this.StencilFuncBack  = this.StencilFuncFront;
     this.StencilOpBack    = this.StencilOpFront;
     this.ColorMask        = ColorMask.Rgba;
     this.LineWidth        = 1f;
 }
コード例 #2
0
 /// <summary>Sets the depth test function</summary>
 /// <param name="func">Structure representing the depth test function</param>
 public void SetDepthFunc(DepthFunc func)
 {
     this.state.DepthFunc          = func;
     GraphicsContext.notifyUpdate |= GraphicsUpdate.DepthFunc;
 }