Added differentiation between Non power of two textures when mip mapped vs

when not mipped mapped to get round the issue of incomplete support under
ATI cards.
This commit is contained in:
Robert Osfield
2005-05-17 11:00:13 +00:00
parent a4b2383672
commit 2e4b266c39
4 changed files with 30 additions and 9 deletions

View File

@@ -189,8 +189,11 @@ void Texture1D::applyTexImage1D(GLenum target, Image* image, State& state, GLsiz
bool compressed = isCompressedInternalFormat(_internalFormat);
//Rescale if resize hint is set or NPOT not supported or dimension exceeds max size
if( _resizeNonPowerOfTwoHint || !extensions->isNonPowerOfTwoTextureSupported() || inwidth > extensions->maxTextureSize() )
if( _resizeNonPowerOfTwoHint || !extensions->isNonPowerOfTwoTextureSupported(_min_filter) || inwidth > extensions->maxTextureSize() )
{
// this is not thread safe... should really create local image data and rescale to that as per Texture2D.
image->ensureValidSizeForTexturing(extensions->maxTextureSize());
}
glPixelStorei(GL_UNPACK_ALIGNMENT,image->getPacking());