1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-06 17:41:04 +00:00

Expose all OpenGL filtering modes, use OpenGL names for them

Because of a review comment on the Irrlicht PR by numberZero.
This commit is contained in:
Gregor Parzefall 2023-06-24 23:36:36 +02:00 committed by sfan5
parent 6bf63d4b41
commit 7473e4cafd
12 changed files with 18 additions and 18 deletions

View file

@ -255,7 +255,7 @@ void TestCAO::addToScene(ITextureSource *tsrc, scene::ISceneManager *smgr)
buf->getMaterial().Lighting = false;
buf->getMaterial().BackfaceCulling = false;
buf->getMaterial().setTexture(0, tsrc->getTextureForMesh("rat.png"));
buf->getMaterial().TextureLayers[0].MinFilter = video::ETMINF_NEAREST;
buf->getMaterial().TextureLayers[0].MinFilter = video::ETMINF_NEAREST_MIPMAP_NEAREST;
buf->getMaterial().TextureLayers[0].MagFilter = video::ETMAGF_NEAREST;
buf->getMaterial().FogEnable = true;
buf->getMaterial().MaterialType = video::EMT_TRANSPARENT_ALPHA_CHANNEL;
@ -653,7 +653,7 @@ void GenericCAO::addToScene(ITextureSource *tsrc, scene::ISceneManager *smgr)
mat.NormalizeNormals = true;
}
mat.forEachTexture([] (video::SMaterialLayer &tex) {
tex.MinFilter = video::ETMINF_NEAREST;
tex.MinFilter = video::ETMINF_NEAREST_MIPMAP_NEAREST;
tex.MagFilter = video::ETMAGF_NEAREST;
});
};