aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.OpenGL/Image/TextureBase.cs
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2020-10-29 18:57:34 -0300
committerGitHub <noreply@github.com>2020-10-29 22:57:34 +0100
commit423da5cc911bf7545746ad4fd184eff42f32dd9b (patch)
treec554fe100de8be953a8a492d4386e23e6a91b7e8 /Ryujinx.Graphics.OpenGL/Image/TextureBase.cs
parent780c7530d69068dd651c33e18828e23dc6977d90 (diff)
Scale texture resolution before sending to backend (#1646)
* Work * Propagate scale factor to copy temp. Not really needed, just here for consistency * PR feedback
Diffstat (limited to 'Ryujinx.Graphics.OpenGL/Image/TextureBase.cs')
-rw-r--r--Ryujinx.Graphics.OpenGL/Image/TextureBase.cs7
1 files changed, 2 insertions, 5 deletions
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();