BGE patch: [#29285] Video Texture: Avoid slow rescale (non power of 2 support check...
authorDalai Felinto <dfelinto@gmail.com>
Thu, 24 Nov 2011 19:27:15 +0000 (19:27 +0000)
committerDalai Felinto <dfelinto@gmail.com>
Thu, 24 Nov 2011 19:27:15 +0000 (19:27 +0000)
commitddfc518caea168ae1882e717ef28a35f91705a14
treec00a7a6571c6aa5c387cf9404a759f7f0f13df74
parent366554d3038f9710f469bd2461c6761784f11f34
BGE patch: [#29285] Video Texture: Avoid slow rescale (non power of 2 support check) by Goran Milovanovic (goran)
"Just a simple check for non power of two support (GLEW_ARB_texture_non_power_of_two), to avoid what seems to be a very slow, and very unnecessary gluScaleImage call."

This is the only part of the VideoTexture that does the POT calculation, so the check seems good.
It would be interesting if some opengl guru would like to benchmark the use of this in other areas of Blender (e.g. 2D Filters, and all GLSL materials).

Note that mipmap should also be supported automatically by this extension, so it's not something to worry about.
source/gameengine/VideoTexture/Texture.cpp