DepthModeConverter.cs 538 B

1234567891011121314151617181920
  1. using OpenTK.Graphics.OpenGL;
  2. using Ryujinx.Graphics.GAL;
  3. using System;
  4. namespace Ryujinx.Graphics.OpenGL
  5. {
  6. static class DepthModeConverter
  7. {
  8. public static ClipDepthMode Convert(this DepthMode mode)
  9. {
  10. switch (mode)
  11. {
  12. case DepthMode.MinusOneToOne: return ClipDepthMode.NegativeOneToOne;
  13. case DepthMode.ZeroToOne: return ClipDepthMode.ZeroToOne;
  14. }
  15. throw new ArgumentException($"Invalid depth mode \"{mode}\".");
  16. }
  17. }
  18. }