From 423da5cc911bf7545746ad4fd184eff42f32dd9b Mon Sep 17 00:00:00 2001 From: gdkchan <gab.dark.100@gmail.com> Date: Thu, 29 Oct 2020 18:57:34 -0300 Subject: Scale texture resolution before sending to backend (#1646) * Work * Propagate scale factor to copy temp. Not really needed, just here for consistency * PR feedback --- Ryujinx.Graphics.OpenGL/Image/TextureBase.cs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'Ryujinx.Graphics.OpenGL/Image/TextureBase.cs') diff --git a/Ryujinx.Graphics.OpenGL/Image/TextureBase.cs b/Ryujinx.Graphics.OpenGL/Image/TextureBase.cs index 5f786dec..2e70fa82 100644 --- a/Ryujinx.Graphics.OpenGL/Image/TextureBase.cs +++ b/Ryujinx.Graphics.OpenGL/Image/TextureBase.cs @@ -1,6 +1,5 @@ using OpenTK.Graphics.OpenGL; using Ryujinx.Graphics.GAL; -using System; namespace Ryujinx.Graphics.OpenGL.Image { @@ -10,8 +9,8 @@ namespace Ryujinx.Graphics.OpenGL.Image public TextureCreateInfo Info { get; } - public int Width { get; } - public int Height { get; } + public int Width => Info.Width; + public int Height => Info.Height; public float ScaleFactor { get; } public Target Target => Info.Target; @@ -20,8 +19,6 @@ namespace Ryujinx.Graphics.OpenGL.Image public TextureBase(TextureCreateInfo info, float scaleFactor = 1f) { Info = info; - Width = (int)Math.Ceiling(Info.Width * scaleFactor); - Height = (int)Math.Ceiling(Info.Height * scaleFactor); ScaleFactor = scaleFactor; Handle = GL.GenTexture(); -- cgit v1.2.3-70-g09d2