Page 1 of 1

[Solved] Turning off font texture filtering

Posted: Tue Apr 06, 2021 6:03 pm
by Ray1184
Ogre Version: :1.12.11:
Operating System: :Windows 10:
Render System: :OpenGL Rendering Subsystem:


Hello everyone,
On the game engine I'm developing I need to render every texture without any filter interpolation.

I turned off interpolation for standard texture, overlays and so on with this:

Code: Select all

Ogre::MaterialManager::getSingleton().setDefaultTextureFiltering(Ogre::FilterOptions::FO_NONE, Ogre::FilterOptions::FO_NONE, Ogre::FilterOptions::FO_NONE);

This works fine, but seems that font in TextAreaOverlays continue to use some kind of interpolation, is there a way to solve it?

Thanks a lot

Ray

Re: Turning off font texture filtering

Posted: Wed Apr 07, 2021 4:39 am
by sercero
What happens if you do this:

Code: Select all

Ogre::TextAreaOverlayElement *element;
element->getMaterial()->setTextureFiltering(Ogre::FilterOptions::FO_NONE);
References:
https://ogrecave.github.io/ogre/api/1.1 ... 449cd1de9a

https://ogrecave.github.io/ogre/api/1.1 ... 7ea14e7131

Re: Turning off font texture filtering

Posted: Wed Apr 07, 2021 8:05 am
by Ray1184
Much better!!
Probably even setting NONE as default texture filtering the text area continued to use the LINEAR one.

Thank you very much!

Ray