From Farshid Lashkari, support for non power of two extension.

This commit is contained in:
Robert Osfield
2005-05-06 09:04:41 +00:00
parent fd9f5c0f43
commit fc585cd33d
5 changed files with 58 additions and 9 deletions

View File

@@ -188,7 +188,9 @@ void Texture1D::applyTexImage1D(GLenum target, Image* image, State& state, GLsiz
// select the internalFormat required for the texture.
bool compressed = isCompressedInternalFormat(_internalFormat);
image->ensureValidSizeForTexturing(extensions->maxTextureSize());
//Rescale if resize hint is set or NPOT not supported or dimension exceeds max size
if( _resizeNonPowerOfTwoHint || !extensions->isNonPowerOfTwoTextureSupported() || inwidth > extensions->maxTextureSize() )
image->ensureValidSizeForTexturing(extensions->maxTextureSize());
glPixelStorei(GL_UNPACK_ALIGNMENT,image->getPacking());