public StencilTestOperationDesc_NativeInterop(ref StencilTestOperationDesc desc)
 {
     stencilTestFunction       = desc.stencilTestFunction;
     stencilFailOperation      = desc.stencilFailOperation;
     stencilDepthFailOperation = desc.stencilDepthFailOperation;
     stencilPassOperation      = desc.stencilPassOperation;
 }
 public DepthStencilDesc_NativeInterop(ref DepthStencilDesc desc)
 {
     depthTestEnable        = (byte)(desc.depthTestEnable ? 1 : 0);
     depthWriteEnable       = (byte)(desc.depthWriteEnable ? 1 : 0);
     depthTestFunction      = desc.depthTestFunction;
     stencilTestEnable      = (byte)(desc.stencilTestEnable ? 1 : 0);
     stencilWriteEnable     = (byte)(desc.stencilWriteEnable ? 1 : 0);
     stencilFrontFacingDesc = new StencilTestOperationDesc_NativeInterop(ref desc.stencilFrontFacingDesc);
     stencilBackFacingDesc  = new StencilTestOperationDesc_NativeInterop(ref desc.stencilBackFacingDesc);
 }