Class FacedCubemapData

  • All Implemented Interfaces:
    CubemapData

    public class FacedCubemapData
    extends java.lang.Object
    implements CubemapData
    A FacedCubemapData holds a cubemap data definition based on a TextureData per face.
    • Constructor Detail

      • FacedCubemapData

        public FacedCubemapData()
        Construct an empty Cubemap. Use the load(...) methods to set the texture of each side. Every side of the cubemap must be set before it can be used.
      • FacedCubemapData

        public FacedCubemapData​(FileHandle positiveX,
                                FileHandle negativeX,
                                FileHandle positiveY,
                                FileHandle negativeY,
                                FileHandle positiveZ,
                                FileHandle negativeZ,
                                boolean useMipMaps)
        Construct a Cubemap with the specified texture files for the sides, optionally generating mipmaps.
      • FacedCubemapData

        public FacedCubemapData​(Pixmap positiveX,
                                Pixmap negativeX,
                                Pixmap positiveY,
                                Pixmap negativeY,
                                Pixmap positiveZ,
                                Pixmap negativeZ)
        Construct a Cubemap with the specified Pixmaps for the sides, does not generate mipmaps.
      • FacedCubemapData

        public FacedCubemapData​(Pixmap positiveX,
                                Pixmap negativeX,
                                Pixmap positiveY,
                                Pixmap negativeY,
                                Pixmap positiveZ,
                                Pixmap negativeZ,
                                boolean useMipMaps)
        Construct a Cubemap with the specified Pixmaps for the sides, optionally generating mipmaps.
      • FacedCubemapData

        public FacedCubemapData​(int width,
                                int height,
                                int depth,
                                Pixmap.Format format)
        Construct a Cubemap with Pixmaps for each side of the specified size.
    • Method Detail

      • isManaged

        public boolean isManaged()
        Specified by:
        isManaged in interface CubemapData
        Returns:
        whether this implementation can cope with a EGL context loss.
      • isComplete

        public boolean isComplete()
        Returns:
        True if all sides of this cubemap are set, false otherwise.
      • getWidth

        public int getWidth()
        Specified by:
        getWidth in interface CubemapData
        Returns:
        the width of the pixel data
      • getHeight

        public int getHeight()
        Specified by:
        getHeight in interface CubemapData
        Returns:
        the height of the pixel data
      • isPrepared

        public boolean isPrepared()
        Specified by:
        isPrepared in interface CubemapData
        Returns:
        whether the TextureData is prepared or not.
      • consumeCubemapData

        public void consumeCubemapData()
        Description copied from interface: CubemapData
        Uploads the pixel data for the 6 faces of the cube to the OpenGL ES texture. The caller must bind an OpenGL ES texture. A call to CubemapData.prepare() must preceed a call to this method. Any internal data structures created in CubemapData.prepare() should be disposed of here.
        Specified by:
        consumeCubemapData in interface CubemapData