Class KTXWriter

java.lang.Object
com.jme3.texture.plugins.ktx.KTXWriter

public class KTXWriter extends Object
This class allows one to write a KTX file. It doesn't support compressed data yet.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a KTXWriter that will write files in the given path
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    write(Image image, Class<? extends Texture> textureType, String fileName)
    Writes an image with the given params textureType, allows one to write textureArrays, Texture3D, and TextureCubeMaps.
    void
    write(Image image, String fileName)
    Writes a 2D image from the given image in a KTX file named from the fileName param Note that the fileName should contain the extension (.ktx sounds like a wise choice)

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • KTXWriter

      public KTXWriter(String path)
      Creates a KTXWriter that will write files in the given path
      Parameters:
      path - the desired filesystem path (alias created)
  • Method Details

    • write

      public void write(Image image, String fileName)
      Writes a 2D image from the given image in a KTX file named from the fileName param Note that the fileName should contain the extension (.ktx sounds like a wise choice)
      Parameters:
      image - the image to write
      fileName - the name of the file to write
    • write

      public void write(Image image, Class<? extends Texture> textureType, String fileName)
      Writes an image with the given params textureType, allows one to write textureArrays, Texture3D, and TextureCubeMaps. Texture2D will write a 2D image. Note that the fileName should contain the extension (.ktx sounds like a wise choice)
      Parameters:
      image - the image to write
      textureType - the texture type
      fileName - the name of the file to write