示例#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 alpha-blending function (for the alpha channel)</summary>
 /// <param name="func">Structure representing the alpha-blending function</param>
 public void SetBlendFuncAlpha(BlendFunc func)
 {
     this.state.BlendFuncAlpha     = func;
     GraphicsContext.notifyUpdate |= GraphicsUpdate.BlendFunc;
 }