From 35524bd79da13cd0dec2319ee9b648f578188c07 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sun, 22 Jun 2003 01:02:22 +0000 Subject: [PATCH] avoid <8x8 bitmap textures --- stepmania/src/RageBitmapTexture.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/stepmania/src/RageBitmapTexture.cpp b/stepmania/src/RageBitmapTexture.cpp index 10cb758083..c390305447 100644 --- a/stepmania/src/RageBitmapTexture.cpp +++ b/stepmania/src/RageBitmapTexture.cpp @@ -171,6 +171,14 @@ apply_color_key: m_iTextureWidth = power_of_two(m_iImageWidth); m_iTextureHeight = power_of_two(m_iImageHeight); + /* If we're under 8x8, increase it, to avoid filtering problems on odd hardware. */ + if(m_iTextureWidth < 8 || m_iTextureHeight < 8) + { + actualID.bStretch = true; + m_iTextureWidth = max(8, m_iTextureWidth); + m_iTextureHeight = max(8, m_iTextureHeight); + } + ASSERT( m_iTextureWidth <= actualID.iMaxSize ); ASSERT( m_iTextureHeight <= actualID.iMaxSize );