public FileTextureArrayData (Pixmap.Format format, boolean useMipMaps, FileHandle[] files) { this.format = format; this.useMipMaps = useMipMaps; this.depth = files.length; textureDatas = new TextureData[files.length]; for (int i = 0; i < files.length; i++) { textureDatas[i] = TextureData.Factory.loadFromFile(files[i], format, useMipMaps); } }
/** Construct a Cubemap with the specified texture files for the sides, optionally generating mipmaps. */ public FacedCubemapData (FileHandle positiveX, FileHandle negativeX, FileHandle positiveY, FileHandle negativeY, FileHandle positiveZ, FileHandle negativeZ) { this(TextureData.Factory.loadFromFile(positiveX, false), TextureData.Factory.loadFromFile(negativeX, false), TextureData.Factory.loadFromFile(positiveY, false), TextureData.Factory.loadFromFile( negativeY, false), TextureData.Factory.loadFromFile(positiveZ, false), TextureData.Factory .loadFromFile(negativeZ, false)); }
@Override public void loadAsync (AssetManager manager, String fileName, FileHandle file, TextureParameter parameter) { info.filename = fileName; if (parameter == null || parameter.textureData == null) { Format format = null; boolean genMipMaps = false; info.texture = null; if (parameter != null) { format = parameter.format; genMipMaps = parameter.genMipMaps; info.texture = parameter.texture; } info.data = TextureData.Factory.loadFromFile(file, format, genMipMaps); } else { info.data = parameter.textureData; info.texture = parameter.texture; } if (!info.data.isPrepared()) info.data.prepare(); }
@Override public void loadAsync (AssetManager manager, String fileName, FileHandle file, TextureParameter parameter) { info.filename = fileName; if (parameter == null || parameter.textureData == null) { Format format = null; boolean genMipMaps = false; info.texture = null; if (parameter != null) { format = parameter.format; genMipMaps = parameter.genMipMaps; info.texture = parameter.texture; } info.data = TextureData.Factory.loadFromFile(file, format, genMipMaps); } else { info.data = parameter.textureData; info.texture = parameter.texture; } if (!info.data.isPrepared()) info.data.prepare(); }
public Texture (FileHandle file, Format format, boolean useMipMaps) { this(TextureData.Factory.loadFromFile(file, format, useMipMaps)); }
public static TextureData loadFromFile (FileHandle file, boolean useMipMaps) { return loadFromFile(file, null, useMipMaps); }
public Texture (FileHandle file, Format format, boolean useMipMaps) { this(TextureData.Factory.loadFromFile(file, format, useMipMaps)); }
public static TextureData loadFromFile (FileHandle file, boolean useMipMaps) { return loadFromFile(file, null, useMipMaps); }
public static TextureData loadFromFile (FileHandle file, boolean useMipMaps) { return loadFromFile(file, null, useMipMaps); }
public static TextureData loadFromFile (FileHandle file, boolean useMipMaps) { return loadFromFile(file, null, useMipMaps); }
/** Construct a Cubemap with the specified texture files for the sides, optionally generating mipmaps. */ public Cubemap (FileHandle positiveX, FileHandle negativeX, FileHandle positiveY, FileHandle negativeY, FileHandle positiveZ, FileHandle negativeZ, boolean useMipMaps) { this(TextureData.Factory.loadFromFile(positiveX, useMipMaps), TextureData.Factory.loadFromFile(negativeX, useMipMaps), TextureData.Factory.loadFromFile(positiveY, useMipMaps), TextureData.Factory.loadFromFile(negativeY, useMipMaps), TextureData.Factory.loadFromFile(positiveZ, useMipMaps), TextureData.Factory.loadFromFile(negativeZ, useMipMaps)); }
/** Construct a Cubemap with the specified texture files for the sides, optionally generating mipmaps. */ public FacedCubemapData (FileHandle positiveX, FileHandle negativeX, FileHandle positiveY, FileHandle negativeY, FileHandle positiveZ, FileHandle negativeZ, boolean useMipMaps) { this(TextureData.Factory.loadFromFile(positiveX, useMipMaps), TextureData.Factory.loadFromFile( negativeX, useMipMaps), TextureData.Factory.loadFromFile(positiveY, useMipMaps), TextureData.Factory .loadFromFile(negativeY, useMipMaps), TextureData.Factory.loadFromFile(positiveZ, useMipMaps), TextureData.Factory.loadFromFile(negativeZ, useMipMaps)); }
/** Construct a Cubemap with the specified texture files for the sides, optionally generating mipmaps. */ public FacedCubemapData (FileHandle positiveX, FileHandle negativeX, FileHandle positiveY, FileHandle negativeY, FileHandle positiveZ, FileHandle negativeZ) { this(TextureData.Factory.loadFromFile(positiveX, false), TextureData.Factory.loadFromFile(negativeX, false), TextureData.Factory.loadFromFile(positiveY, false), TextureData.Factory.loadFromFile( negativeY, false), TextureData.Factory.loadFromFile(positiveZ, false), TextureData.Factory .loadFromFile(negativeZ, false)); }
/** Construct a Cubemap with the specified texture files for the sides, optionally generating mipmaps. */ public Cubemap (FileHandle positiveX, FileHandle negativeX, FileHandle positiveY, FileHandle negativeY, FileHandle positiveZ, FileHandle negativeZ, boolean useMipMaps) { this(TextureData.Factory.loadFromFile(positiveX, useMipMaps), TextureData.Factory.loadFromFile(negativeX, useMipMaps), TextureData.Factory.loadFromFile(positiveY, useMipMaps), TextureData.Factory.loadFromFile(negativeY, useMipMaps), TextureData.Factory.loadFromFile(positiveZ, useMipMaps), TextureData.Factory.loadFromFile(negativeZ, useMipMaps)); }
/** Construct a Cubemap with the specified texture files for the sides, optionally generating mipmaps. */ public FacedCubemapData (FileHandle positiveX, FileHandle negativeX, FileHandle positiveY, FileHandle negativeY, FileHandle positiveZ, FileHandle negativeZ) { this(TextureData.Factory.loadFromFile(positiveX, false), TextureData.Factory.loadFromFile(negativeX, false), TextureData.Factory.loadFromFile(positiveY, false), TextureData.Factory.loadFromFile( negativeY, false), TextureData.Factory.loadFromFile(positiveZ, false), TextureData.Factory .loadFromFile(negativeZ, false)); }
/** Loads the texture specified using the {@link FileHandle} and sets it to specified side, overwriting any previous data set to * that side. Note that you need to reload through {@link Cubemap#load(CubemapData)} any cubemap using this data for the change * to be taken in account. * @param side The {@link CubemapSide} * @param file The texture {@link FileHandle} */ public void load (CubemapSide side, FileHandle file) { data[side.index] = TextureData.Factory.loadFromFile(file, false); }
/** Loads the texture specified using the {@link FileHandle} and sets it to specified side, overwriting any previous data set to * that side. Note that you need to reload through {@link Cubemap#load(CubemapData)} any cubemap using this data for the change * to be taken in account. * @param side The {@link CubemapSide} * @param file The texture {@link FileHandle} */ public void load (CubemapSide side, FileHandle file) { data[side.index] = TextureData.Factory.loadFromFile(file, false); }
/** Construct a Cubemap with the specified texture files for the sides, optionally generating mipmaps. */ public FacedCubemapData (FileHandle positiveX, FileHandle negativeX, FileHandle positiveY, FileHandle negativeY, FileHandle positiveZ, FileHandle negativeZ, boolean useMipMaps) { this(TextureData.Factory.loadFromFile(positiveX, useMipMaps), TextureData.Factory.loadFromFile( negativeX, useMipMaps), TextureData.Factory.loadFromFile(positiveY, useMipMaps), TextureData.Factory .loadFromFile(negativeY, useMipMaps), TextureData.Factory.loadFromFile(positiveZ, useMipMaps), TextureData.Factory.loadFromFile(negativeZ, useMipMaps)); }
public FileTextureArrayData (Pixmap.Format format, boolean useMipMaps, FileHandle[] files) { this.format = format; this.useMipMaps = useMipMaps; this.depth = files.length; textureDatas = new TextureData[files.length]; for (int i = 0; i < files.length; i++) { textureDatas[i] = TextureData.Factory.loadFromFile(files[i], format, useMipMaps); } }
public FileTextureArrayData (Pixmap.Format format, boolean useMipMaps, FileHandle[] files) { this.format = format; this.useMipMaps = useMipMaps; this.depth = files.length; textureDatas = new TextureData[files.length]; for (int i = 0; i < files.length; i++) { textureDatas[i] = TextureData.Factory.loadFromFile(files[i], format, useMipMaps); } }