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

@@ -101,7 +101,7 @@ void Texture3D::computeRequiredTextureDimensions(State& state, const osg::Image&
int width,height,depth;
if( !_resizeNonPowerOfTwoHint && texExtensions->isNonPowerOfTwoTextureSupported() )
if( !_resizeNonPowerOfTwoHint && texExtensions->isNonPowerOfTwoTextureSupported(_min_filter) )
{
width = image.s();
height = image.t();
@@ -278,7 +278,7 @@ void Texture3D::applyTexImage3D(GLenum target, Image* image, State& state, GLsiz
}
//Rescale if resize hint is set or NPOT not supported or dimensions exceed max size
if( _resizeNonPowerOfTwoHint || !texExtensions->isNonPowerOfTwoTextureSupported()
if( _resizeNonPowerOfTwoHint || !texExtensions->isNonPowerOfTwoTextureSupported(_min_filter)
|| inwidth > extensions->maxTexture3DSize()
|| inheight > extensions->maxTexture3DSize()
|| indepth > extensions->maxTexture3DSize() )