diff options
| author | BaronKiko <BaronKiko@users.noreply.github.com> | 2019-03-04 02:51:23 +0000 |
|---|---|---|
| committer | jduncanator <1518948+jduncanator@users.noreply.github.com> | 2019-03-04 13:51:23 +1100 |
| commit | a2a46501084d3463203da970632640a95e32e423 (patch) | |
| tree | cee1b5e8f67482644f688c4855e6c7eea63fa581 | |
| parent | 1f554c1093dde6a4d3ed80fae2675abfb6c12fac (diff) | |
Rebased, in theory (#610)
| -rw-r--r-- | Ryujinx.Graphics/Gal/OpenGL/OglTexture.cs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/Ryujinx.Graphics/Gal/OpenGL/OglTexture.cs b/Ryujinx.Graphics/Gal/OpenGL/OglTexture.cs index f836702f..21edd89e 100644 --- a/Ryujinx.Graphics/Gal/OpenGL/OglTexture.cs +++ b/Ryujinx.Graphics/Gal/OpenGL/OglTexture.cs @@ -177,6 +177,24 @@ namespace Ryujinx.Graphics.Gal.OpenGL data.Length, data); break; + case TextureTarget.TextureCubeMap: + Span<byte> array = new Span<byte>(data); + + int faceSize = ImageUtils.GetSize(image) / 6; + + for (int Face = 0; Face < 6; Face++) + { + GL.CompressedTexImage2D( + TextureTarget.TextureCubeMapPositiveX + Face, + level, + internalFmt, + image.Width, + image.Height, + border, + faceSize, + array.Slice(Face * faceSize, faceSize).ToArray()); + } + break; default: throw new NotImplementedException($"Unsupported texture target type: {target}"); } |
