texture size

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
julienlecomte
Posts: 5
Joined: Mon May 01, 2006 1:02 pm

texture size

Post by julienlecomte »

I've got some problems with texture sizes in OpenGL, not software mode.
I've got a full screen image that I load which is 1024x768; in which case the texture is rendered with ugly blocks.
To make it look as intended, I had to size my texture to 1024x1024. Is this normal ? 768 is a multiple of 16 and I expect it to show nicely.
Alberto Rubinato
Posts: 7
Joined: Fri Dec 09, 2005 9:41 pm
Location: Italy

Post by Alberto Rubinato »

Hi,
in order to solve your problem you have to use texture with it's size is power of two.

768 is not power of two. You can use texture of this size:

2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, and so on ( always *2)

For example your texture could be:

64 x 64, or 256 x 256 or also 1024 x 64, 16 x 512, 2 x 256, and so on.

The above mentioned sizes in any combination are okay.

Alberto
jrm
Posts: 111
Joined: Tue Dec 13, 2005 8:57 pm

Post by jrm »

Just to confirm this. Yes this does work. It fixed my drawing problem too. Now my image is clear, just like the actual file.

JRM
Post Reply