Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Page 1 of 3 123 LastLast
Results 1 to 10 of 23

Thread: NPOT: difference between non_power_of_two_ARB vs texture_rectangle_ARB ?

  1. #1
    Junior Member Newbie
    Join Date
    Nov 2003
    Location
    Montreal, Quebec, Canada
    Posts
    19

    NPOT: difference between non_power_of_two_ARB vs texture_rectangle_ARB ?

    Hello,

    the extension non_power_of_two_ARB has first been created with the goal of relaxing the constraint of using power-of-two texture... great... then they created the texture_rectangle_ARB extension and it has the exact same goal but this time the semantic is completely different (ie: different target, different coordinates)... why ?

    Why would one use the texture_rectangle extension ? Is it that the non-power-of-two extension comes with a cost of performance ?

  2. #2
    Junior Member Regular Contributor
    Join Date
    Feb 2004
    Posts
    248

    Re: NPOT: difference between non_power_of_two_ARB vs texture_rectangle_ARB ?

    GL_EXT_texture_rectangle or GL_NV_texture_rectangle have been there for a number of years.
    Rectangular textures are supported on most hardware in contrast to NPOT textures.
    I myself like to use rectangular textures when dealing with fullscreen quads because of the matching uv coordinates.

  3. #3
    Junior Member Regular Contributor
    Join Date
    Sep 2005
    Posts
    103

    Re: NPOT: difference between non_power_of_two_ARB vs texture_rectangle_ARB ?

    ATi does not support arb_texture_rectangle ( which is the only one, that can be read from, in glslang shaders

    ATi supports npot, but i don't like them much, because of normalized texcoords. which are not the best for me in gpgpu.

  4. #4
    Member Regular Contributor CrazyButcher's Avatar
    Join Date
    Jan 2004
    Location
    Germany
    Posts
    401

    Re: NPOT: difference between non_power_of_two_ARB vs texture_rectangle_ARB ?

    ati supports the ext_rect version, too.

  5. #5
    Senior Member OpenGL Pro
    Join Date
    Jul 2001
    Location
    France
    Posts
    1,663

    Re: NPOT: difference between non_power_of_two_ARB vs texture_rectangle_ARB ?

    Originally posted by shelll:
    ATi does not support arb_texture_rectangle ( which is the only one, that can be read from, in glslang shaders

    ATi supports npot, but i don't like them much, because of normalized texcoords. which are not the best for me in gpgpu.
    Are you sure GLSL does not support NPOT textures ?

  6. #6
    Senior Member OpenGL Pro
    Join Date
    May 2000
    Location
    Naarn, Austria
    Posts
    1,102

    Re: NPOT: difference between non_power_of_two_ARB vs texture_rectangle_ARB ?

    the extension non_power_of_two_ARB has first been created with the goal of relaxing the constraint of using power-of-two texture... great... then they created the texture_rectangle_ARB extension and it has the exact same goal but this time the semantic is completely different (ie: different target, different coordinates)... why ?
    No.

    The texture rectangle extension was created first. It has very strong limitations, like only no 3D textures, no mipmapping, limited filter modes and so on... This was because hardware wasn't (and to some extent still isn't) capable of doing better.

    Then they made the NPOT extension as an improvement, it has no limitations, it just releases the power of two constraint.

    So if you have hardware that is capable of using NPOT, use it. There should be no performance penalty. If you don't have the hardware, you have no other choice but to use texture rectangle.

  7. #7
    Senior Member OpenGL Guru zed's Avatar
    Join Date
    Jul 2000
    Location
    S41.16.25 E173.16.21
    Posts
    2,407

    Re: NPOT: difference between non_power_of_two_ARB vs texture_rectangle_ARB ?

    "Are you sure GLSL does not support NPOT textures?"

    my hardware doesnt support them so i havent tested but i cant see why it wouldnt support them, for texture_rectange u use
    textureRect( .. )

    + im assuming for NPOT u just use the standard texture2D( .. )

  8. #8
    Senior Member OpenGL Guru
    Join Date
    Mar 2001
    Posts
    3,576

    Re: NPOT: difference between non_power_of_two_ARB vs texture_rectangle_ARB ?

    Non-Power-Of-Two textures are exactly that: textures that are not restricted in being powers of two in size.

    Rectangle textures are an entirely different kind of texture. They are as different from a 2D texture as a 2D texture is from a cube map.

    A rectangle texture isn't just an attempt to be NPOT; it is a specialized texture format that is indexed by non-normalized texture coordinates. It is uniquely useful as framebuffer render targets, as well as GPGPU programming.

  9. #9
    Junior Member Newbie
    Join Date
    Nov 2003
    Location
    Montreal, Quebec, Canada
    Posts
    19

    Re: NPOT: difference between non_power_of_two_ARB vs texture_rectangle_ARB ?

    OK, it's just that the non-power-of-two extension has been approved by the ARB in june 2003, written against OpenGL 1.4. Now I thought that when an extension is approved by the ARB and is written against a given OpenGL version that means it automatically becomes part of the next OpenGL version. ? so that would mean that every graphic driver supporting OpenGL 1.5 and above would support NPOT

    If so then I am confused because the rectangle extension has been approved one year later by the ARB, this time written against OpenGL 2.0 so against a version that already supports NPOT. In the spec the first thing they say is:
    <<OpenGL texturing is limited to images with power-of-two dimensions and an optional 1-texel border. The ARB_texture_rectangle extension adds a new texture target that supports 2D textures without requiring power-of-two dimensions.>>

    So this is why I am confused...

    But if the value of the rectangle extension resides more in its support for non-normalized coordinates than in its support for NPOT then it starts to make sense...

    Or maybe the non-power-of-two extension is still an extension not yet part of the standard even in OpenGL1.5, 2.0, ... so NPOT might still not be supported by some drivers ?

  10. #10
    Junior Member Regular Contributor
    Join Date
    Sep 2005
    Posts
    103

    Re: NPOT: difference between non_power_of_two_ARB vs texture_rectangle_ARB ?

    jide: i see, i wasn'n clear enough. i meant, that the arb extension is the only one frome rectangles (NV/EXT/ARB), which adds support for glslang (sampler2Drect, texture2DRect). NPOTS are of course supported by glslang. they are "simple" texture_2d.

    ATi supports only the EXT version of rectangles, so no glslang support. what brings some difficulties into gpgpu.

    npot is part of ogl 2.0 core. ATi doesn't expose the extension at all, just with saying, that the card is ogl 2.0.

    ATi(maybe nVidia too) supports npots on older HW, but with same limitations as rectangles (of course, if you want them accelerated. you can use mipmaps, but it will run in SW running slow as hell )

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •