IImage problem on IntelGraphic

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
bonsalty
Posts: 120
Joined: Thu Dec 10, 2009 1:30 pm
Location: Budapest,Hungary

IImage problem on IntelGraphic

Post by bonsalty »

I've tested IImage and it works fine on most cards. On the Mobile IntelR 945 chipset cards they look horrible. Its like a resized picture - some lines of pixels are lost. However I dont do any resize. What should I do? Has anybody encountered this problem? (The problem exist in DirectX-OpenGL render...)
Tomi
Virion
Competition winner
Posts: 2148
Joined: Mon Dec 18, 2006 5:04 am

Post by Virion »

i have a laptop that runs intel graphics but i don't have such problem. any screenshot?
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

And any code which reproduces this? Main problem could be the gfx driver, so depending on your OS and driver version some probelms may arise which are not on other systems. Moreover, mipmapping, filtering, etc. may not work on Intel cards without using POT textures. But we'd need to know something about the image dimensions etc for this
bonsalty
Posts: 120
Joined: Thu Dec 10, 2009 1:30 pm
Location: Budapest,Hungary

Post by bonsalty »

Image

Basicly the code is simple, but its wrapped :

Code: Select all

void Image::New(CString path_of_texture,Irrlicht_params *ip,int x, int y) {
	
		Remove();
		params=ip;
		
		if (_access(path_of_texture.GetBuffer(),NULL)!=-1 ){
		video::IImage *myIImage=params->driver->createImageFromFile(path_of_texture.GetBuffer());

		params->driver->setMaterial(video::SMaterial());
		params->driver->removeTexture(texture);
		CString name="image"+IntToStr(rand()%1000);

		texture=params->driver->addTexture(name.GetBuffer(),myIImage);	
		
		img=params->env->addImage(texture,core::position2d<s32>(x,y));
		myIImage->drop();
		}
	}

The Buttons are all IImage.

Both system are Win7. I know Intel Mobile is a crap, but it should work on that too.

What are pot textures anyway?

PS: I know, one image button is different.
Tomi
bonsalty
Posts: 120
Joined: Thu Dec 10, 2009 1:30 pm
Location: Budapest,Hungary

Post by bonsalty »

One more interesting thing:
Check out the big orange layer button on the left side.
The upper 3/4 of the image seems to show up correctly, while the lower 1/4 of the image is distorted...
Tomi
randomMesh
Posts: 1186
Joined: Fri Dec 29, 2006 12:04 am

Post by randomMesh »

Be sure your images are a power of two in width and height.
That's what POT means. Power Of Two.
"Whoops..."
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Well, since it's the 2d part, mipmaps are probably out. But the filtering could be a problem. Or the power of two scaling, which changes the buttons to dimensions of power of two (32,64,128,...) and then scales it down again by texture coords.
bonsalty
Posts: 120
Joined: Thu Dec 10, 2009 1:30 pm
Location: Budapest,Hungary

Post by bonsalty »

Thanks problem is solved by using POT. Those Mobile Intel grapghics card may not support filtering causing ugly images when they are resized by Irrlicht.
Tomi
Post Reply