/ src / Ryujinx.Graphics.OpenGL / FormatInfo.cs
FormatInfo.cs
 1  using OpenTK.Graphics.OpenGL;
 2  
 3  namespace Ryujinx.Graphics.OpenGL
 4  {
 5      readonly struct FormatInfo
 6      {
 7          public int Components { get; }
 8          public bool Normalized { get; }
 9          public bool Scaled { get; }
10  
11          public PixelInternalFormat PixelInternalFormat { get; }
12          public PixelFormat PixelFormat { get; }
13          public PixelType PixelType { get; }
14  
15          public bool IsCompressed { get; }
16  
17          public FormatInfo(
18              int components,
19              bool normalized,
20              bool scaled,
21              All pixelInternalFormat,
22              PixelFormat pixelFormat,
23              PixelType pixelType)
24          {
25              Components = components;
26              Normalized = normalized;
27              Scaled = scaled;
28              PixelInternalFormat = (PixelInternalFormat)pixelInternalFormat;
29              PixelFormat = pixelFormat;
30              PixelType = pixelType;
31              IsCompressed = false;
32          }
33  
34          public FormatInfo(int components, bool normalized, bool scaled, All pixelFormat)
35          {
36              Components = components;
37              Normalized = normalized;
38              Scaled = scaled;
39              PixelInternalFormat = 0;
40              PixelFormat = (PixelFormat)pixelFormat;
41              PixelType = 0;
42              IsCompressed = true;
43          }
44      }
45  }