Class TLcdEarthTextureData

java.lang.Object
com.luciad.earth.tileset.datatype.TLcdEarthTextureData

public class TLcdEarthTextureData extends Object
A container for texture data that can be used directly with OpenGL (for instance with glTexImage2D()). A TLcdEarthTextureData contains the following data:
  • a Buffer containing the texture's pixel data;
  • the width and height of the texture in pixels;
  • the border size of the texture;
  • the internal format of the texture, which is one of the symbolic constants accepted by glTexImage2D(), e.g. GL_RGB8 or GL_RGBA8.
  • the pixel format of the texture data, which is one of the symbolic constants accepted by glTexImage2D(), e.g. GL_RGB or GL_RGBA.
  • the data type of the texture data, which is one of the symbolic constants accepted by glTexImage2D(), e.g. GL_UNSIGNED_BYTE or GL_FLOAT.
  • a boolean indicating whether the texture data is in a compressed format (and should thus be uploaded using glCompressedTexImage2D() rather than glTexImage2D();
  • a boolean indicating whether the texture data is flipped vertically; if this is set, texture coordinates should be generated as if texture coordinate (0, 0) corresponds to the upper left corner of the image, rather than the lower left corner as is the default.
Since:
8.2
  • Field Details

  • Constructor Details

    • TLcdEarthTextureData

      public TLcdEarthTextureData(int aInternalFormat, int aWidth, int aHeight, int aBorder, int aPixelFormat, int aPixelType, boolean aIsCompressed, boolean aMustFlipVertically, Buffer aBuffer)
      Creates a new texture data object with the specified parameters.
      Parameters:
      aInternalFormat - the internal format
      aWidth - the width of the image
      aHeight - the height of the image
      aBorder - the border width of the image (or zero if the image has no border)
      aPixelFormat - the pixel format of the texture data
      aPixelType - the type of the texture data
      aIsCompressed - true if the texture data is compressed
      aMustFlipVertically - true if the texture data is flipped vertically
      aBuffer - a buffer containing the pixel data
  • Method Details

    • getWidth

      public int getWidth()
      Returns the width of the texture.
      Returns:
      the width of the texture
    • getHeight

      public int getHeight()
      Returns the height of the texture.
      Returns:
      the height of the texture
    • getBorder

      public int getBorder()
      Returns the border width of the texture (or zero if the texture has no border).
      Returns:
      the border width of the texture
    • getPixelFormat

      public int getPixelFormat()
      Returns the pixel format of the texture.
      Returns:
      the pixel format of the texture
    • getPixelType

      public int getPixelType()
      Returns the pixel type of the texture.
      Returns:
      the pixel type of the texture
    • getInternalFormat

      public int getInternalFormat()
      Returns the internal format of the texture.
      Returns:
      the internal format of the texture
    • isDataCompressed

      public boolean isDataCompressed()
      Returns true if the texture data is in a compressed format.
      Returns:
      true if the texture data is in a compressed format
    • isMustFlipVertically

      public boolean isMustFlipVertically()
      Returns true if the texture data is flipped vertically.
      Returns:
      true if the texture data is flipped vertically
    • getBuffer

      public Buffer getBuffer()
      Returns the buffer containing the texture's pixel data.
      Returns:
      the buffer containing the texture's pixel data