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,
|
||||
IntPtr.Zero);
|
||||
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:
|
||||
Logger.PrintWarning(LogClass.Gpu, $"Unsupported texture target type: {Target}");
|
||||
throw new InvalidOperationException();
|
||||
|
|
Loading…
Add table
Reference in a new issue