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:
Diffstat (limited to 'source/gameengine/VideoTexture/Texture.cpp')
-rw-r--r--source/gameengine/VideoTexture/Texture.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/source/gameengine/VideoTexture/Texture.cpp b/source/gameengine/VideoTexture/Texture.cpp
index e1ddd7fce1e..40e9f899ef0 100644
--- a/source/gameengine/VideoTexture/Texture.cpp
+++ b/source/gameengine/VideoTexture/Texture.cpp
@@ -329,7 +329,17 @@ PyObject * Texture_refresh (Texture * self, PyObject * args)
// get texture size
short * orgSize = self->m_source->m_image->getSize();
// calc scaled sizes
- short size[] = {ImageBase::calcSize(orgSize[0]), ImageBase::calcSize(orgSize[1])};
+ short size[2];
+ if (GLEW_ARB_texture_non_power_of_two)
+ {
+ size[0] = orgSize[0];
+ size[1] = orgSize[1];
+ }
+ else
+ {
+ size[0] = ImageBase::calcSize(orgSize[0]);
+ size[1] = ImageBase::calcSize(orgSize[1]);
+ }
// scale texture if needed
if (size[0] != orgSize[0] || size[1] != orgSize[1])
{