power of two size

hey, I was wondering, this rule of texture just images with “power of two size” sux… does someone know a way to use images without this kind of size?

There’s an ARB extension for that. Something like ARB_NONPOWEROFTWO. Do a search on google.

This extension is called ARB_texture_non_power_of_two, and it is a core feature of OpenGL 2.0. AFAIK the GF 6800 is the only card that supports this extension.

There is another way though. With the ARB_texture_rectangle you can have arbitrary sized 2D textures, but with some limitations (no mipmapping, no repeating, no border if i remember correctly). It is supported by most modern cards.

Just round up to the next power of 2 higher and change your texture coordinates. Pack another texture in the extra space if you are really hard up…

I heard about a function called gluScaleImage
what this function’s job ?

As far as I know this takes a MxN textures and scales it to WxH.
This is what most people does when having npotd textures.
I heard this function is often slow… I don’t know if this is true but I just wanted to tell you, anyway it’s not in a performance path so it really does not care.

whats MxN ???

Originally posted by Obli:
As far as I know this takes a MxN textures and scales it to WxH.
What I meant to say is that it takes a texture which is MxN pixels and resizes it to WxH (width x height).
Maybe WxH should be power of two dimensioned. I don’t remember.

BTW my GF 6600 just loads textures with non power of 2 sizes without any codechanges! :rolleyes: I just discovered this fact when I tried my application on an older card where I got a GLerror. Quite nice not to think about the images sizes. :smiley:

cheers
Boim