From 8c21cfbb419afb58cc099698afe87d67b7bb8ee7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=BCnther=20Brammer?= Date: Sat, 30 May 2009 21:24:14 +0200 Subject: [PATCH] OpenGL: Use support for non-power-of-two-textures if available --- standard/src/StdSurface2.cpp | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/standard/src/StdSurface2.cpp b/standard/src/StdSurface2.cpp index 27e27e6c1..e1cccc5c9 100644 --- a/standard/src/StdSurface2.cpp +++ b/standard/src/StdSurface2.cpp @@ -222,7 +222,15 @@ bool CSurface::CreateTextures(int MaxTextureSize) // free previous FreeTextures(); // get needed tex size - begin with smaller value of wdt/hgt, so there won't be too much space wasted - int iNeedSize=Min(Wdt, Hgt); int n=0; while ((1<<++n) < iNeedSize) {} iNeedSize=1<MaxTexSize); if (MaxTextureSize) @@ -246,7 +254,14 @@ bool CSurface::CreateTextures(int MaxTextureSize) { // last texture might be smaller iNeedSize=Max(Wdt%iTexSize, Hgt%iTexSize); - int n=0; while ((1<<++n) < iNeedSize) {} iNeedSize=1<FillBlack();