I saw some game using textures such as 256×512, is this standard opengl feature? and is it supported by all drivers?
I’ve had the impression that both width and height must be same size (and power of two). But can they really be different size (but still power of two) ?
Edit: also i would like to know that is there any performance differences with 512×128 vs 256×256 (same memory use) ?
Check the spec or the docs:
For power-of-two textures and ignoring borders
width = 2^nandheight = 2^m, wherenandmcan be different numbers.widthorheightcannot exceedGL_MAX_TEXTURE_SIZE.As far as performance goes you can’t really know ahead of time if a given GL implementation uses linear or tiled texture representations internally. A tiled implementation won’t really care if you have a 1024×16 or 16×1024 texture, since all the caches see are little (for example) 16×16 chunks of texels. A linear implementation will have a much better cache hit rate on a 16×1024 texture than a 1024×16, assuming row-major storage.