IGUIImage larger than 256x256?

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
shurijo
Posts: 148
Joined: Sat Feb 21, 2004 3:04 am

IGUIImage larger than 256x256?

Post by shurijo »

Hi,

I'm having a strange problem...

I have an image (like splash screen image) that is bigger than 256x256 (JPEG). When I use img->setImage( driver->getTexture(".//data//gfx//whatever.jpg")), it looks very pixelated.

However, if I crop it down to 256 and then use the exact same command, it looks perfect.

Code below works with both (just modify rect extents), but the larger than 256x256 is very pixelated.

Code: Select all

	
int ul = (GAME_RESX-300)/2;
int ur = (GAME_RESY-300)/2;
irr::gui::IGUIImage* img = env->addImage(rect<int>(ul , ur, ul+256, ur+256),0,1);
img->setImage( driver->getTexture(".//data//gfx//splash.jpg"));
Is there a way that I can use the IGUIImage with an image over 256x256? Or am I just missing an entire image drawing class somewhere?

P.S. I've also tried using driver->draw2DImage(img,0,0) and the result is the same. Larger than 256x256 looks all pixelated.

Thanks,
shurijo
Posts: 148
Joined: Sat Feb 21, 2004 3:04 am

Doh. I think I figured it out.

Post by shurijo »

Doh. I think I figured it out.

Images must be 256x256, 512x512, 256x512, etc. My image was 300x300, so it didn't work.

Sorry for the newb question, this is my first time working with textures/images, etc.
disanti
Posts: 367
Joined: Sat Jan 17, 2004 1:36 am
Location: California, US
Contact:

Post by disanti »

I noticed that when drawing pictures with DirectX 9 in Irrlicht, things just get pixelated. If you take it down to 8 it works fine. ;)
________
Help for love
Last edited by disanti on Tue Feb 22, 2011 8:02 am, edited 1 time in total.
Tyn
Posts: 932
Joined: Thu Nov 20, 2003 7:53 pm
Location: England
Contact:

Post by Tyn »

Although for me the DX rendor doesn't look to great, I find that OpenGL displays the best 2D graphics although I expect that it's probably a bug or something somewhere that will be sorted out eventually.
Post Reply