Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMitchell Stokes <mogurijin@gmail.com>2012-07-10 23:23:57 +0400
committerMitchell Stokes <mogurijin@gmail.com>2012-07-10 23:23:57 +0400
commit831ae18622971c9d3be878d0e44db77217e605ad (patch)
tree4c1564402c284accd85c0aab2e87d76b62386d47 /source/gameengine
parentf279576f1afc7a7ac67dc10a2a62932eda4989f7 (diff)
Scaling non-power-of-two (NPOT) textures to powers of two is really time consuming and not necessary on graphics cards that can support NPOT textures. So, if the graphics card has NPOT texture support, don't bother scaling. If this patch causes issues, it can always be reverted and applied to Swiss instead.
Diffstat (limited to 'source/gameengine')
-rw-r--r--source/gameengine/Ketsji/BL_Texture.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/gameengine/Ketsji/BL_Texture.cpp b/source/gameengine/Ketsji/BL_Texture.cpp
index 19247664dfa..f2d67e9131d 100644
--- a/source/gameengine/Ketsji/BL_Texture.cpp
+++ b/source/gameengine/Ketsji/BL_Texture.cpp
@@ -169,7 +169,7 @@ bool BL_Texture::InitFromImage(int unit, Image *img, bool mipmap)
void BL_Texture::InitGLTex(unsigned int *pix,int x,int y,bool mipmap)
{
- if (!is_power_of_2_i(x) || !is_power_of_2_i(y) ) {
+ if (!GLEW_ARB_texture_non_power_of_two && (!is_power_of_2_i(x) || !is_power_of_2_i(y)) ) {
InitNonPow2Tex(pix, x,y,mipmap);
return;
}