本文整理汇总了Java中com.badlogic.gdx.graphics.glutils.KTXTextureData类的典型用法代码示例。如果您正苦于以下问题:Java KTXTextureData类的具体用法?Java KTXTextureData怎么用?Java KTXTextureData使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
KTXTextureData类属于com.badlogic.gdx.graphics.glutils包,在下文中一共展示了KTXTextureData类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: loadAsync
import com.badlogic.gdx.graphics.glutils.KTXTextureData; //导入依赖的package包/类
@Override
public void loadAsync (AssetManager manager, String fileName, FileHandle file, CubemapParameter parameter) {
info.filename = fileName;
if (parameter == null || parameter.cubemapData == null) {
Pixmap pixmap = null;
Format format = null;
boolean genMipMaps = false;
info.cubemap = null;
if (parameter != null) {
format = parameter.format;
info.cubemap = parameter.cubemap;
}
if (fileName.contains(".ktx") || fileName.contains(".zktx")) {
info.data = new KTXTextureData(file, genMipMaps);
}
} else {
info.data = parameter.cubemapData;
info.cubemap = parameter.cubemap;
}
if (!info.data.isPrepared()) info.data.prepare();
}
示例2: loadFromFile
import com.badlogic.gdx.graphics.glutils.KTXTextureData; //导入依赖的package包/类
public static TextureData loadFromFile (FileHandle file, Format format, boolean useMipMaps) {
if (file == null) return null;
if (file.name().endsWith(".cim")) return new FileTextureData(file, PixmapIO.readCIM(file), format, useMipMaps);
if (file.name().endsWith(".etc1")) return new ETC1TextureData(file, useMipMaps);
if (file.name().endsWith(".ktx") || file.name().endsWith(".zktx")) return new KTXTextureData(file, useMipMaps);
return new FileTextureData(file, new Pixmap(file), format, useMipMaps);
}
示例3: loadTexData
import com.badlogic.gdx.graphics.glutils.KTXTextureData; //导入依赖的package包/类
protected TextureData loadTexData(FileHandle file, Format format, boolean genMipMaps) {
if (file.name().endsWith(".ktx") || file.name().endsWith(".zktx")) {
return new KTXTextureData(file, genMipMaps);
}
return new PremultFileTextureData(file, format, genMipMaps);
}