DepthStencilModeConverter.cs 527 B

1234567891011121314151617181920
  1. using OpenTK.Graphics.OpenGL;
  2. using Ryujinx.Graphics.GAL.Texture;
  3. using System;
  4. namespace Ryujinx.Graphics.OpenGL
  5. {
  6. static class DepthStencilModeConverter
  7. {
  8. public static All Convert(this DepthStencilMode mode)
  9. {
  10. switch (mode)
  11. {
  12. case DepthStencilMode.Depth: return All.Depth;
  13. case DepthStencilMode.Stencil: return All.Stencil;
  14. }
  15. throw new ArgumentException($"Invalid depth stencil mode \"{mode}\".");
  16. }
  17. }
  18. }