diff --git a/MonoGame.Framework/Graphics/Texture2D.cs b/MonoGame.Framework/Graphics/Texture2D.cs index 925925220a9..6515b6bc3b6 100644 --- a/MonoGame.Framework/Graphics/Texture2D.cs +++ b/MonoGame.Framework/Graphics/Texture2D.cs @@ -72,7 +72,9 @@ 1. Definitions using TextureMinFilter = OpenTK.Graphics.ES20.All; using PixelInternalFormat = OpenTK.Graphics.ES20.All; using PixelType = OpenTK.Graphics.ES20.All; +using PixelStoreParameter = OpenTK.Graphics.ES20.All; using ErrorCode = OpenTK.Graphics.ES20.All; + #endif using Microsoft.Xna.Framework.Content; @@ -348,7 +350,7 @@ public int Height else { // Set pixel alignment to match texel size in bytes - GL.PixelStore(All.UnpackAlignment, GraphicsExtensions.Size(this.Format)); + GL.PixelStore(PixelStoreParameter.UnpackAlignment, GraphicsExtensions.Size(this.Format)); if (rect.HasValue) { GL.TexSubImage2D(TextureTarget.Texture2D, level, @@ -368,7 +370,7 @@ public int Height GraphicsExtensions.CheckGLError(); } // Return to default pixel alignment - GL.PixelStore(All.UnpackAlignment, 4); + GL.PixelStore(PixelStoreParameter.UnpackAlignment, 4); } #if !ANDROID