Implement CubeMap textures in OGLTexture.Create
This commit is contained in:
parent
be47d4d16c
commit
82e10ad3ad
1 changed files with 18 additions and 0 deletions
|
@ -88,6 +88,24 @@ namespace Ryujinx.Graphics.Gal.OpenGL
|
||||||
Type,
|
Type,
|
||||||
IntPtr.Zero);
|
IntPtr.Zero);
|
||||||
break;
|
break;
|
||||||
|
case TextureTarget.TextureCubeMap:
|
||||||
|
|
||||||
|
int FaceSize = ImageUtils.GetSize(Image) / Image.Depth;
|
||||||
|
|
||||||
|
for (int i = 0; i < 6; i++)
|
||||||
|
{
|
||||||
|
GL.TexImage2D(
|
||||||
|
TextureTarget.TextureCubeMapPositiveX + i,
|
||||||
|
Level,
|
||||||
|
InternalFmt,
|
||||||
|
Image.Width,
|
||||||
|
Image.Height,
|
||||||
|
Border,
|
||||||
|
Format,
|
||||||
|
Type,
|
||||||
|
IntPtr.Zero);
|
||||||
|
}
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
Logger.PrintWarning(LogClass.Gpu, $"Unsupported texture target type: {Target}");
|
Logger.PrintWarning(LogClass.Gpu, $"Unsupported texture target type: {Target}");
|
||||||
throw new InvalidOperationException();
|
throw new InvalidOperationException();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue