From 017b96be5fb00493f96e89505d6c38fd8c66db45 Mon Sep 17 00:00:00 2001 From: Flamefire Date: Sat, 4 May 2013 14:20:44 +0200 Subject: [PATCH] Bugfix for OpenGL (missing real bmp size) --- Vocaluxe/Lib/Draw/COpenGL.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Vocaluxe/Lib/Draw/COpenGL.cs b/Vocaluxe/Lib/Draw/COpenGL.cs index 4cfb9866..3cdd6c02 100644 --- a/Vocaluxe/Lib/Draw/COpenGL.cs +++ b/Vocaluxe/Lib/Draw/COpenGL.cs @@ -706,8 +706,11 @@ namespace Vocaluxe.Lib.Draw int w = Math.Min(bmp.Width, maxSize); int h = Math.Min(bmp.Height, maxSize); - texture.W2 = MathHelper.NextPowerOfTwo(w); - texture.H2 = MathHelper.NextPowerOfTwo(h); + w = MathHelper.NextPowerOfTwo(w); + h = MathHelper.NextPowerOfTwo(h); + + texture.W2 = w; + texture.H2 = h; Bitmap bmp2 = null; try