PDA

View Full Version : Texture map size



luc_pop
11-27-2001, 05:00 AM
I have look at some tutorials and all says that a size of the bitmap should be



bitmap.width = 2n + 2;
bitmap.heigth = 2m + 2;
n,m integers

But in my applications the textures are only displayed when the width and the heigth is a multiple of 2:



bitmap.width = 2^n;
bitmap.heigth = 2^m;
n,m integers

Why is it like that?

Thank you

11-27-2001, 05:06 AM
>But in my applications the textures are >only displayed when the width and the >heigth is a multiple of 2:
>Why is it like that?

simply because this is the right way. no idea what your tutors mean, but textures have to be 2^n in size. and when your textures are displayed it can't be wrong, eh ? =)

--styx

j
11-27-2001, 09:02 AM
2^n + 2 and 2^m + 2 are the values that you get if you use the texture border. If you don't, then it's 2^n and 2^m, like styx^hcr said.

j

styx
11-27-2001, 10:45 PM
>2^n + 2 and 2^m + 2 are the values that you
>get if you use the texture border.

humm, right, I forgot that. never used it yet anyways.

--styx