On Nov 14, 2006, at 2:40 PM, Mikael Kindborg wrote:
On 11/14/06, Joshua Gargus schwa@fastmail.us wrote:
Are textures faster? Will have to learn more about this.
Texture-mapped quads are the way to go.
Looked at glTexImage2D and the documentation says that width and height must be powers of two, which is not very nice for sprites. However, I saw that in OpenGL 2.1 "Non-Power-Of-Two Textures" are introduced as a standard: http://www.opengl.org/documentation/current_version/
If you are willing to waste some memory, you can always set up your texture coordinates to only include the region of the power-of-two texture that has sprite data. Or, as you say, use NPOT textures. Although they're only now becoming part of the standard, they are usable via extensions of a wide range of hardware.
Josh
Regards, Micke