mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2024-11-24 03:02:19 +00:00
Rebased, in theory (#610)
This commit is contained in:
parent
1f554c1093
commit
a2a4650108
1 changed files with 18 additions and 0 deletions
|
@ -177,6 +177,24 @@ namespace Ryujinx.Graphics.Gal.OpenGL
|
||||||
data.Length,
|
data.Length,
|
||||||
data);
|
data);
|
||||||
break;
|
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:
|
default:
|
||||||
throw new NotImplementedException($"Unsupported texture target type: {target}");
|
throw new NotImplementedException($"Unsupported texture target type: {target}");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue