Class Texture.CppProxy

  • All Implemented Interfaces:
    Texture
    Enclosing interface:
    Texture

    public static final class Texture.CppProxy
    extends java.lang.Object
    implements Texture
    • Method Detail

      • _djinni_private_destroy

        public void _djinni_private_destroy()
      • finalize

        protected void finalize()
                         throws java.lang.Throwable
        Overrides:
        finalize in class java.lang.Object
        Throws:
        java.lang.Throwable
      • loadByFd

        public void loadByFd​(int fd)
        Description copied from interface: Texture
        Load texture data from specified file descriptor.
        Specified by:
        loadByFd in interface Texture
        Parameters:
        fd - (i32): file descriptor, should be closed on the caller side.
      • load

        public void load​(java.lang.String fileName)
        Description copied from interface: Texture
        Load texture data from specified file name. For now only supported .png, .jpeg, .jpg, .ktx (2d) images.
        Specified by:
        load in interface Texture
        Parameters:
        fileName - (string): absolute path for image file
      • getWidth

        public int getWidth()
        Specified by:
        getWidth in interface Texture
        Returns:
        width (int) of loaded image
      • getHeight

        public int getHeight()
        Specified by:
        getHeight in interface Texture
        Returns:
        height (int) of loaded image
      • getLayers

        public int getLayers()
        Specified by:
        getLayers in interface Texture
        Returns:
        channels count of loaded image (R, RG, RGBA, i.e. 1, 2, or 4).
      • setMips

        public void setMips​(boolean enable)
        Description copied from interface: Texture
        set mimpap generation flag. (affect only on ogl backend).
        Specified by:
        setMips in interface Texture
        Parameters:
        enable - (bool): mipmap generation enable flag.
      • hasMips

        public boolean hasMips()
        Specified by:
        hasMips in interface Texture
        Returns:
        flag (bool) : mimpap generation flag
      • setTiling

        public void setTiling​(boolean enable)
        Description copied from interface: Texture
        enable/disable texture tiling
        Specified by:
        setTiling in interface Texture
        Parameters:
        enable - (bool): tiled wrapping flag
      • getTiling

        public boolean getTiling()
        Specified by:
        getTiling in interface Texture
        Returns:
        tiled texture wrapping flag (bool).
      • asImage

        public Image asImage()
        Specified by:
        asImage in interface Texture
        Returns:
        upcast to base type