且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

libgdx纹理过滤器和mipmap

更新时间:2023-01-26 16:53:17

我遇到了同样的问题,而且修复非常简单.创建Texture时,需要指定它使用mipmap.

I had this same problem, and the fix turned out to be insanely simple. When you create a Texture, you need to specify that it uses mipmaps.

您要做的就是像这样将第二个参数传递给Texture构造函数:

All you have to do is pass a second parameter to the Texture constructor like this:

Texture myTexture = new Texture(Gdx.files.internal("myImage.png"), true);

您可以在以下API文档中查看所有Texture类构造函数:

You can view all the Texture class constructors in the API docs here: http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/graphics/Texture.html