Monday, 2 July 2012

Monday, 2 July 2012

POT

Not the kind you smoke, but rather Power Of Two. OpenGL has to have textures as Power Of Two. That means valid sizes are as follows:
2,4,8,16,32,64,128,256,512,1024...

Of couse you can have any size image, but once you turn it into a usable texture it's expanded to the nearest POT. Worst case scenario you have a texture that's 513x513, and you've just wasted 785,407 pixels (or 74.9%) worth of memory. If you can, try and make sure you get as close under one of those values as possible, or better yet create a sprite sheet.


Categories:

0 comments: