what are the limits on texture size for opengl

I have been told conflicting information and need to know what the limitations/contraints actually are for textures in openGl.

I thought they had a limit of 256x256
and the dimensions must be in powers of 2…
correct?

dd

OpenGL says texture dims must be a power of 2, but says nothing about max texture size. That is up to the implementation.

For instance, TNT2 - GF2 has max texture size of 2048x2048. GF3 is 4096x4096. If I recall, the voodoos used to be 256x256.

Incidentally, nvidia also has an extension for non power of 2 texturemaps now, but I’m not sure what hardware supports it.

– Zeno

Use GetIntegerv(GL_MAX_TEXTURE_SIZE,) to query max supported 2d/1d texture size.
GL_MAX_3D_TEXTURE_SIZE for 3d textures.
GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB for cube maps.

NVIDIA documentation says that, the rectangular textures are supported in HW by gf1/gf2/gf3.

Am i also correct in saying, that if the texture dimensions are greater than that supported by the implementation, and auto-scale is employed?

dd

nope- you’ll get no textures rendered

Watch out using 2048 though - ATI’s cards only go up to 1024 IIRC.

The only constraints on size is that textures up to 64*64 has to be supported.

The glu function to build mip-maps automaticly re-scales non power of 2 textures but wont limit the size, but that is easy to do by checking like Michail Bespalov and using gluScale.
Tim

Originally posted by pocketmoon:
[b]nope- you’ll get no textures rendered

Watch out using 2048 though - ATI’s cards only go up to 1024 IIRC.[/b]

Don’t know about earlier cards but Radeon does 2048 too.

AFAICR, the Rage 128 also supports 2048x2048. The Rage Pro and derivatives only support 1024x1024. But it will probably bog down in any app that uses them, anyway