PDA

View Full Version : GL_ARB_texture_non_power_of_two support?



Leadwerks
04-24-2008, 01:04 PM
How common is support for GL_ARB_texture_non_power_of_two? Can this be depended on for all ATI SM 3.0+ hardware?

Zengar
04-24-2008, 01:13 PM
As far as I know, yes.

Komat
04-24-2008, 03:34 PM
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).

Zengar
04-24-2008, 04:43 PM
Huh? I thought that ATI was the company pushing this extension because all their hardware since 1x00 supported it natively?

Komat
04-24-2008, 05:07 PM
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.

Lord crc
04-24-2008, 05:07 PM
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.

Komat
04-24-2008, 05:11 PM
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.

Leadwerks
04-24-2008, 06:07 PM
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?

Lord crc
04-24-2008, 10:23 PM
This does not work for GeForce FX cards.

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:

http://www.delphi3d.net/hardware/extsupport.php?extension=GL_ARB_texture_rectangle
http://www.delphi3d.net/hardware/extsupport.php?extension=GL_EXT_texture_rectangle

(afaik the difference between the ARB and EXT version is minor, but check out the specs anyway)

Komat
04-25-2008, 01:25 AM
(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.

Lord crc
04-25-2008, 03:53 AM
Ah that was it. Been too long since I tried to use it. Yet another reason to love ATI's OpenGL commitment...

Leadwerks
05-21-2008, 08:00 PM
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.