views:

23

answers:

1

Hey

I want to create big texture which is power of 2 and put in this file a lot of smaller textures. You know, I have several textures which are not power of 2 so I cant load them to my program. I have to put them in one file (512x512 for example).

Do you know any program which can do it for me automaticly? Is there any limit of size of texture? Can I use for example 8192x8192 file? Or I have to use few smaller.

A: 

The keyword you're looking for is texture atlas.

The maximum texture size is GPU-dependent, 8k is fine on newer cards. Such a texture consumes, however, a vast amount of VRAM (and it gets worse if you count in MIPs). So it might be better to use several smaller textures and have only those in (hot) VRAM which you really need.

Alexander Gessler
Hmm...An iPhone - I shouldn't create textures biggest than 1024, should I?
Moriquendi
Oh, I was talking of desktop/workstation GPUs. For OpenGl (ES) `glGetIntegerv(GL_MAX_TEXTURE_SIZE)` gives you the maximum texture size programmatically.
Alexander Gessler