Topic: How to disable smoothing textures in maratis?

I want to achieve a retro result, using very small as in this game textures:

http://cdn.akamai.steamstatic.com/steam … 1469233030

http://s2.n4g.com/news/1941257_0.jpg

http://insertmoin.de/wp-content/uploads … moirai.jpg

https://i.ytimg.com/vi/50jOBb5QKMI/maxresdefault.jpg


the problem is that maratis smooth textures making small textures look very blurry, can I disable smoothing?

Re: How to disable smoothing textures in maratis?

In c++, after loading the mesh, you can parse the textures of the mesh and call :

MTexture * texture = mesh->getTexture(i);
render->bindTexture(texture->getTextureRef()->getTextureId());
render->setTextureFilterMode(M_TEX_FILTER_NEAREST, M_TEX_FILTER_NEAREST);

Re: How to disable smoothing textures in maratis?

works well on objects with a single texture and a single material, objects with various textures and various materials has no effect.
I see the bindTexture () function takes an optional second parameter called multitextureId should I allocate a value to this variable?

Re: How to disable smoothing textures in maratis?

Be sure to parse all the textures of the mesh (mesh->getTexturesNumber()), you don't need to use the second parameter for that.
Also, if some textures are shared between objects, do this after all meshes are loaded in case the loading override the filtering.