diff options
Diffstat (limited to 'src/resources/openglimagehelper.cpp')
-rw-r--r-- | src/resources/openglimagehelper.cpp | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/src/resources/openglimagehelper.cpp b/src/resources/openglimagehelper.cpp index 06c40388b..38e1a6e9a 100644 --- a/src/resources/openglimagehelper.cpp +++ b/src/resources/openglimagehelper.cpp @@ -132,17 +132,9 @@ Image *OpenGLImageHelper::createTextSurface(SDL_Surface *const tmpImage, int OpenGLImageHelper::powerOfTwo(const int input) { - int value; - if (mTextureType == GL_TEXTURE_2D) - { - value = 1; - while (value < input && value < mTextureSize) - value <<= 1; - } - else - { - value = input; - } + int value = 1; + while (value < input && value < mTextureSize) + value <<= 1; return value >= mTextureSize ? mTextureSize : value; } |