On my old ATI Radeon 9600 (with Catalyst 2.0.5079) the GL_TEXTURE_RECTANGLE_ARB extension works very well. It happily draws many bound textures at the same time.
Actually the card says it doesn’t support the “GL_ARB_texture_rectangle” extension but it does the “GL_EXT_texture_rectangle” extension, which means the same result. So it’s ok to query for the first OR the latter extension.
Whilst I’m using this extension for plain 2d OpenGL rectangles (with JOGL) and so don’t need MIN_FILTER or MAG_FILTER, there are a few restrictions, like Spasi said.
The row byte count of the NPOT texture has to be multiple of 4. In case it’s an RGBA texture you can use any texture width. In case it’s a RGB texture however the width must be a multiple of 4. If you forget this, the resulting texture looks corrupted.
Using the rectangle extension together with on-the-fly compression does work basically but is terrible slow. I’m not sure if this is ATI only, but I avoid it for NPOT textures.
Meta code…
Bind the texture
glBindTexture(GL_TEXTURE_RECTANGLE_ARB, <texture_id>);
glTexImage2D(GL_TEXTURE_RECTANGLE_ARB, 0, , <texture_width>, <texture_hight>, 0, <RGB|RGBA>, GL_UNSIGNED_BYTE, );
Later on paint it:
glBindTexture(GL_TEXTURE_RECTANGLE_ARB, <texture_id>);
glEnable(GL_TEXTURE_RECTANGLE_ARB);
glBegin(GL_QUADS);
glTexCoord2d(0, 0); glVertex2i(0, 0);
glTexCoord2d(1, 0); glVertex2i(<texture_width>, 0);
glTexCoord2d(1, 1); glVertex2i(<texture_height>, <texture_height>);
glTexCoord2d(0, 1); glVertex2i(0, <texture_height>);
glEnd();
Etc