FaceConverter.cs 612 B

1234567891011121314151617181920212223
  1. using OpenTK.Graphics.OpenGL;
  2. using Ryujinx.Graphics.GAL;
  3. using System;
  4. namespace Ryujinx.Graphics.OpenGL
  5. {
  6. static class FaceConverter
  7. {
  8. public static CullFaceMode Convert(this Face face)
  9. {
  10. switch (face)
  11. {
  12. case Face.Back: return CullFaceMode.Back;
  13. case Face.Front: return CullFaceMode.Front;
  14. case Face.FrontAndBack: return CullFaceMode.FrontAndBack;
  15. }
  16. return CullFaceMode.FrontAndBack;
  17. throw new ArgumentException($"Invalid face \"{face}\".");
  18. }
  19. }
  20. }