Class TLcdEarthTextureData
java.lang.Object
com.luciad.earth.tileset.datatype.TLcdEarthTextureData
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
orGL_RGBA8
. - the pixel format of the texture data, which is one of the symbolic
constants accepted by
glTexImage2D()
, e.g.GL_RGB
orGL_RGBA
. - the data type of the texture data, which is one of the symbolic
constants accepted by
glTexImage2D()
, e.g.GL_UNSIGNED_BYTE
orGL_FLOAT
. - a boolean indicating whether the texture data is in a compressed
format (and should thus be uploaded using
glCompressedTexImage2D()
rather thanglTexImage2D()
; - 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 Summary
Modifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
-
Constructor Summary
ConstructorDescriptionTLcdEarthTextureData
(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. -
Method Summary
Modifier and TypeMethodDescriptionint
Returns the border width of the texture (or zero if the texture has no border).Returns the buffer containing the texture's pixel data.int
Returns the height of the texture.int
Returns the internal format of the texture.int
Returns the pixel format of the texture.int
Returns the pixel type of the texture.int
getWidth()
Returns the width of the texture.boolean
Returns true if the texture data is in a compressed format.boolean
Returns true if the texture data is flipped vertically.
-
Field Details
-
GL_ALPHA
public static final int GL_ALPHA- See Also:
-
GL_DEPTH_COMPONENT
public static final int GL_DEPTH_COMPONENT- See Also:
-
GL_LUMINANCE
public static final int GL_LUMINANCE- See Also:
-
GL_LUMINANCE_ALPHA
public static final int GL_LUMINANCE_ALPHA- See Also:
-
GL_INTENSITY
public static final int GL_INTENSITY- See Also:
-
GL_RGB
public static final int GL_RGB- See Also:
-
GL_RGBA
public static final int GL_RGBA- See Also:
-
GL_ALPHA4
public static final int GL_ALPHA4- See Also:
-
GL_ALPHA8
public static final int GL_ALPHA8- See Also:
-
GL_ALPHA12
public static final int GL_ALPHA12- See Also:
-
GL_ALPHA16
public static final int GL_ALPHA16- See Also:
-
GL_DEPTH_COMPONENT16
public static final int GL_DEPTH_COMPONENT16- See Also:
-
GL_DEPTH_COMPONENT24
public static final int GL_DEPTH_COMPONENT24- See Also:
-
GL_DEPTH_COMPONENT32
public static final int GL_DEPTH_COMPONENT32- See Also:
-
GL_LUMINANCE4
public static final int GL_LUMINANCE4- See Also:
-
GL_LUMINANCE8
public static final int GL_LUMINANCE8- See Also:
-
GL_LUMINANCE12
public static final int GL_LUMINANCE12- See Also:
-
GL_LUMINANCE16
public static final int GL_LUMINANCE16- See Also:
-
GL_LUMINANCE4_ALPHA4
public static final int GL_LUMINANCE4_ALPHA4- See Also:
-
GL_LUMINANCE6_ALPHA2
public static final int GL_LUMINANCE6_ALPHA2- See Also:
-
GL_LUMINANCE8_ALPHA8
public static final int GL_LUMINANCE8_ALPHA8- See Also:
-
GL_LUMINANCE12_ALPHA4
public static final int GL_LUMINANCE12_ALPHA4- See Also:
-
GL_LUMINANCE12_ALPHA12
public static final int GL_LUMINANCE12_ALPHA12- See Also:
-
GL_LUMINANCE16_ALPHA16
public static final int GL_LUMINANCE16_ALPHA16- See Also:
-
GL_INTENSITY4
public static final int GL_INTENSITY4- See Also:
-
GL_INTENSITY8
public static final int GL_INTENSITY8- See Also:
-
GL_INTENSITY12
public static final int GL_INTENSITY12- See Also:
-
GL_INTENSITY16
public static final int GL_INTENSITY16- See Also:
-
GL_R3_G3_B2
public static final int GL_R3_G3_B2- See Also:
-
GL_RGB4
public static final int GL_RGB4- See Also:
-
GL_RGB5
public static final int GL_RGB5- See Also:
-
GL_RGB8
public static final int GL_RGB8- See Also:
-
GL_RGB10
public static final int GL_RGB10- See Also:
-
GL_RGB12
public static final int GL_RGB12- See Also:
-
GL_RGB16
public static final int GL_RGB16- See Also:
-
GL_RGBA2
public static final int GL_RGBA2- See Also:
-
GL_RGBA4
public static final int GL_RGBA4- See Also:
-
GL_RGB5_A1
public static final int GL_RGB5_A1- See Also:
-
GL_RGBA8
public static final int GL_RGBA8- See Also:
-
GL_RGB10_A2
public static final int GL_RGB10_A2- See Also:
-
GL_RGBA12
public static final int GL_RGBA12- See Also:
-
GL_RGBA16
public static final int GL_RGBA16- See Also:
-
GL_BGR
public static final int GL_BGR- See Also:
-
GL_BGRA
public static final int GL_BGRA- See Also:
-
GL_COMPRESSED_ALPHA
public static final int GL_COMPRESSED_ALPHA- See Also:
-
GL_COMPRESSED_LUMINANCE
public static final int GL_COMPRESSED_LUMINANCE- See Also:
-
GL_COMPRESSED_LUMINANCE_ALPHA
public static final int GL_COMPRESSED_LUMINANCE_ALPHA- See Also:
-
GL_COMPRESSED_INTENSITY
public static final int GL_COMPRESSED_INTENSITY- See Also:
-
GL_COMPRESSED_RGB
public static final int GL_COMPRESSED_RGB- See Also:
-
GL_COMPRESSED_RGBA
public static final int GL_COMPRESSED_RGBA- See Also:
-
GL_COMPRESSED_RGB_S3TC_DXT1_EXT
public static final int GL_COMPRESSED_RGB_S3TC_DXT1_EXT- See Also:
-
GL_COMPRESSED_RGBA_S3TC_DXT1_EXT
public static final int GL_COMPRESSED_RGBA_S3TC_DXT1_EXT- See Also:
-
GL_COMPRESSED_RGBA_S3TC_DXT3_EXT
public static final int GL_COMPRESSED_RGBA_S3TC_DXT3_EXT- See Also:
-
GL_COMPRESSED_RGBA_S3TC_DXT5_EXT
public static final int GL_COMPRESSED_RGBA_S3TC_DXT5_EXT- See Also:
-
GL_BYTE
public static final int GL_BYTE- See Also:
-
GL_UNSIGNED_BYTE
public static final int GL_UNSIGNED_BYTE- See Also:
-
GL_SHORT
public static final int GL_SHORT- See Also:
-
GL_UNSIGNED_SHORT
public static final int GL_UNSIGNED_SHORT- See Also:
-
GL_INT
public static final int GL_INT- See Also:
-
GL_UNSIGNED_INT
public static final int GL_UNSIGNED_INT- See Also:
-
GL_FLOAT
public static final int GL_FLOAT- See Also:
-
GL_DOUBLE
public static final int GL_DOUBLE- See Also:
-
-
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 formataWidth
- the width of the imageaHeight
- the height of the imageaBorder
- the border width of the image (or zero if the image has no border)aPixelFormat
- the pixel format of the texture dataaPixelType
- the type of the texture dataaIsCompressed
- true if the texture data is compressedaMustFlipVertically
- true if the texture data is flipped verticallyaBuffer
- 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
Returns the buffer containing the texture's pixel data.- Returns:
- the buffer containing the texture's pixel data
-