Пример #1
0
 public static SharpDX.Direct3D9.ClearFlags ClearFlags(ClearDepthStencilFlags bClearDepthStencilFlags)
 {
     SharpDX.Direct3D9.ClearFlags d3dClearFlags = 0;
     if ((bClearDepthStencilFlags & ClearDepthStencilFlags.DepthOnly) != 0) d3dClearFlags |= SharpDX.Direct3D9.ClearFlags.ZBuffer;
     if ((bClearDepthStencilFlags & ClearDepthStencilFlags.StencilOnly) != 0) d3dClearFlags |= SharpDX.Direct3D9.ClearFlags.Stencil;
     return d3dClearFlags;
 }
Пример #2
0
 public static DepthStencil DepthStencil(ClearDepthStencilFlags bFlags)
 {
     switch (bFlags)
     {
         case 0: return ObjectGL.GL42.DepthStencil.None;
         case ClearDepthStencilFlags.DepthOnly: return ObjectGL.GL42.DepthStencil.Depth;
         case ClearDepthStencilFlags.StencilOnly: return ObjectGL.GL42.DepthStencil.Stencil;
         case ClearDepthStencilFlags.All: return ObjectGL.GL42.DepthStencil.Both;
         default: throw new ArgumentOutOfRangeException("bFlags");
     }
 }
Пример #3
0
 public static OpenTK.Graphics.OpenGL.ClearBuffer ClearBuffer(ClearDepthStencilFlags bFlags)
 {
     switch (bFlags)
     {
         case ClearDepthStencilFlags.DepthOnly: return OpenTK.Graphics.OpenGL.ClearBuffer.Depth;
         case ClearDepthStencilFlags.StencilOnly: return OpenTK.Graphics.OpenGL.ClearBuffer.Stencil;
         case ClearDepthStencilFlags.All: return OpenTK.Graphics.OpenGL.ClearBuffer.DepthStencil;
         default: throw new ArgumentOutOfRangeException("bFlags");
     }
 }