choosing the level of mipmapping

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
MedievalMagic13

choosing the level of mipmapping

Post by MedievalMagic13 »

Hello!

I've heard that you can enable/disable mipmapping with version 0.4.2 of the Irrlicht Engine and that you can choose the level of mipmapping. But I can't find the way to do this. Does anybody know? My level looks terrible at the moment because the mipmapping is probably set to highest speed instead of quality.

Thanks in advance.
Homer
Posts: 58
Joined: Tue Nov 18, 2003 7:11 pm
Location: Germany

Post by Homer »

AFAIK the only method to influence render quality is IVideoDriver::setTextureCreationFlag(). With this you can optimize the texture creation process to speed or to quality and you can enable/disable mip-mapping. But I think there is no method to change the amount of mip-map levels (without changing the Irrlicht sources).
MedievalMagic13

Post by MedievalMagic13 »

Thanks for the reply Homer. I found the function and used it in my program but it doesn't work, it's just the same. When I used version 0.4.0, the quality wasn't really great , but it sure was a lot better than with 0.4.2. And I don't want to fall back on an earlier version, because eventually, I'll need the newest one. This is my call to the function i've used:

driver->setTextureCreationFlag(ETCF_OPTIMIZED_FOR_QUALITY, true);

But this doesn't change anything. Maybe it's not because of the mipmaps, but I can't find another reason why my level textures are so bad.[/img][/list][/code]
niko
Site Admin
Posts: 1759
Joined: Fri Aug 22, 2003 4:44 am
Location: Vienna, Austria
Contact:

Post by niko »

You are right, the reason is, that a flag was read wrong in 0.4.2, it is a simple bug. Someone posted a solution in the forum already. I think there was the line in CDirectX8Texture.cpp
bool generateMipLevels = (flags | video::ETCF_CREATE_MIP_MAPS)
which should be replaced by
bool generateMipLevels = (flags & video::ETCF_CREATE_MIP_MAPS)
or something like that.
MedievalMagic13

Post by MedievalMagic13 »

Thanks for the answer Niko :D I'll try it out as soon as possible.
MedievalMagic13

Post by MedievalMagic13 »

Ok, I found the file and the line of code, but it's like you said it should be changed. And if I unpack the source code and make changes to it, how do I recompile it to use it with the engine?
qwe
Posts: 112
Joined: Sun Dec 28, 2003 12:54 am
Location: Oregon, USA

Post by qwe »

assuming you're using msvc6.0, open up Irrlicht.dsw and hit "build all". It'll generate a dll and a .lib. you need to make sure you link with your custom .lib rather than the irrlicht standard. The resulting dll will be about 2 megs, but when you set the build profile thingy to "Release" rather than "Debug" the file size'll go down.

hope this helps
Post Reply