Loading images and getting "distorted"

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
turconi
Posts: 23
Joined: Tue Feb 17, 2009 1:55 am

Loading images and getting "distorted"

Post by turconi »

I created a .png image and when I load it, gets "distorted"...likes it loss quality while loading .png image...

I'm using Irrlicht of SVN (and I tried with Irrlicht 1.5) and using Direct3D9 driver.

Original image:
Image
Displayed image:
Image

Edit:
This occurs with Direct3D9 and OpenGL. With "Software" the transparent border doesn't work. But I want to use it with Direct3D9 because performance is best...
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

This is probably due to the dimensions of the image not being power of two (e.g. 64x256). If your hardware doesn't support NPOT textures the image is scaled to a power of two. This can lead to some artifacts. Better add some transparent border to the image to get it into proper dimensions.
turconi
Posts: 23
Joined: Tue Feb 17, 2009 1:55 am

Post by turconi »

Thanks hybrid, I will try to let it in "power of two".

So, the problem is in MY hardware? And, in any other computer that suports NPOT textures will show the "correct image"?

Soon I edit this post saying if it worked or not.


EDIT:
It worked :D, thanks a lot hibryd!
B@z
Posts: 876
Joined: Thu Jan 31, 2008 5:05 pm
Location: Hungary

Post by B@z »

yeah there are some graphic cards what support NPOT, and that shows good.
for example in my game, i used NPOT textures a lot but wasnt wrong a bit in my computer.
then i tried out at other computer, and it looked awful xD
from that i decided to use POT textures xD
Image
Image
Post Reply