How common is support for GL_ARB_texture_non_power_of_two? Can this be depended on for all ATI SM 3.0+ hardware?
As far as I know, yes.
ATI hw older than 2x00 (anything not DX10 compatible) does not fully support the non power of two textures (and does not expose that extension). They can be created and work as long you stay within the limitation of texture rectangle textures (no mipmaps, clamp mode).
Huh? I thought that ATI was the company pushing this extension because all their hardware since 1x00 supported it natively?
Unfortunately no. I once assumed the same and was hit by the reality when bug in our internal tool allowed npot texture to be created with mipmaps and wrappings which caused sw fallback on X1800.
Afaik the quick way to find out is to check if the driver supports OpenGL 2.0 but does NOT expose the GL_ARB_texture_non_power_of_two extension. In this case it will support the limited form.
This does not work for GeForce FX cards. They support GL2.0 but any NPOT texture will cause sw fallback. If the extension is exposed, you are safe to assume that it is supported. Otherwise you should check if it is known card with partial support or assume that it is not supported.
I only need a linear filter. This is just being used for a render buffer for reflection and refraction effects.
Are rectangle textures more widely supported?
Ah I failed to mention that the method was meant for ATI cards.
As for texture rectangles, it would seem that they are indeed widely supported:
(afaik the difference between the ARB and EXT version is minor, but check out the specs anyway)
Difference is small but important. Only the ARB variant gives you sampler type necessary to access the texture rectangle textures from GLSL.
Ah that was it. Been too long since I tried to use it. Yet another reason to love ATI’s OpenGL commitment…
I found that indeed ATI’s X1xxx cards do not support the extension. I have not tested if it is “silently/secretly” supported or whether ATI’s GLSL implementation allows access to rectangle samplers.