View Full Version : TEXTURE_RECTANGLE_NV without pbuffers?

06-24-2003, 11:14 AM
i have a multitexturing program which is using 2 power-of-2 textures to texture a quad. to test the TEXTURE_RECTANGLE_NV extension i tried changing on texture to non-power-of-2 but its not working. do i have to use pbuffers to use this extension?

06-24-2003, 11:30 AM
You need to change your texture coordinates from the [0,1] range to the [0,textureWidth]x[0,textureHeight] range.

06-24-2003, 11:39 AM
i just changed it to
0, 0
300, 0
300, 256
0, 256

but its still the same. the funny part is that the texture i am loading is an image and so the quad gets a color from that image, so if the image is of the sky, its becomes blue, of a red object makes it reddish. just thought it might help.

06-24-2003, 11:56 AM
Does it only fail when you are using multiple textures? Have you tried just drawing a single quad with the rectangle texture applied?

06-24-2003, 12:09 PM
it was my mistake. my texture coordinates were messed up. Now there are 2 textures, one is a power-of-2 and another is non-power-of-2 and its multitexturing just fine. thanks a lot everyone for all the help.
ps. if i texture the quad with a texRect first and then tex2D or vice versa it still works, so http://www.opengl.org/discussion_boards/ubb/smile.gif