public StencilOperations(StencilOperations other)
 {
     unsafe
     {
         fixed(StencilOperations *p = &this)
         {
             *p = other;
         }
     }
 }
 public DepthStencilStateDesc(bool setdefault)
 {
     DepthEnable      = true;
     WriteEnable      = true;
     DepthFunc        = Comparison.Less;
     StencilEnable    = false;
     StencilReadMask  = 0xFF;
     StencilWriteMask = 0xFF;
     FrontFace        = new StencilOperations();
     BackFace         = new StencilOperations();
     FrontFace.SetDefaults();
     BackFace.SetDefaults();
     StencilRef = 0;
 }
 public DepthStencilStateDesc(
     bool depthEnable            = true,
     bool writeEnable            = true,
     Comparison depthFunc        = Comparison.Less,
     bool stencilEnable          = false,
     byte stencilReadMask        = 0xFF,
     byte stencilWriteMask       = 0xFF,
     byte stencilRef             = 0,
     StencilOperations?frontFace = null,
     StencilOperations?backFace  = null)
 {
     DepthEnable      = depthEnable;
     WriteEnable      = writeEnable;
     DepthFunc        = depthFunc;
     StencilEnable    = stencilEnable;
     StencilReadMask  = stencilReadMask;
     StencilWriteMask = stencilWriteMask;
     StencilRef       = 0;
     FrontFace        = frontFace ?? new StencilOperations(StencilOperation.Keep, StencilOperation.Keep, StencilOperation.Keep, Comparison.Always);
     BackFace         = backFace ?? new StencilOperations(StencilOperation.Keep, StencilOperation.Keep, StencilOperation.Keep, Comparison.Always);
 }