Page 1 of 1

IImage problem on IntelGraphic

Posted: Mon Aug 30, 2010 2:45 pm
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...)

Posted: Mon Aug 30, 2010 2:47 pm
by Virion
i have a laptop that runs intel graphics but i don't have such problem. any screenshot?

Posted: Mon Aug 30, 2010 3:11 pm
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

Posted: Mon Aug 30, 2010 4:36 pm
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.

Posted: Mon Aug 30, 2010 4:44 pm
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...

Posted: Mon Aug 30, 2010 4:51 pm
by randomMesh
Be sure your images are a power of two in width and height.
That's what POT means. Power Of Two.

Posted: Mon Aug 30, 2010 10:14 pm
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.

Posted: Tue Aug 31, 2010 9:46 am
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.