Ryujinx/src/Ryujinx.Graphics.OpenGL/FormatInfo.cs

46 lines
1.3 KiB
C#
Raw Normal View History

2019-10-13 08:02:07 +02:00
using OpenTK.Graphics.OpenGL;
2019-12-29 00:45:33 +01:00
namespace Ryujinx.Graphics.OpenGL
2019-10-13 08:02:07 +02:00
{
readonly struct FormatInfo
2019-10-13 08:02:07 +02:00
{
public int Components { get; }
2019-10-13 08:02:07 +02:00
public bool Normalized { get; }
public bool Scaled { get; }
2019-10-13 08:02:07 +02:00
public PixelInternalFormat PixelInternalFormat { get; }
public PixelFormat PixelFormat { get; }
public PixelType PixelType { get; }
2019-10-13 08:02:07 +02:00
public bool IsCompressed { get; }
public FormatInfo(
int components,
bool normalized,
bool scaled,
All pixelInternalFormat,
2019-10-13 08:02:07 +02:00
PixelFormat pixelFormat,
PixelType pixelType)
2019-10-13 08:02:07 +02:00
{
Components = components;
Normalized = normalized;
Scaled = scaled;
2019-10-13 08:02:07 +02:00
PixelInternalFormat = (PixelInternalFormat)pixelInternalFormat;
PixelFormat = pixelFormat;
PixelType = pixelType;
IsCompressed = false;
2019-10-13 08:02:07 +02:00
}
public FormatInfo(int components, bool normalized, bool scaled, All pixelFormat)
{
Components = components;
Normalized = normalized;
Scaled = scaled;
2019-10-13 08:02:07 +02:00
PixelInternalFormat = 0;
PixelFormat = (PixelFormat)pixelFormat;
PixelType = 0;
IsCompressed = true;
2019-10-13 08:02:07 +02:00
}
}
}