| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class | |
| public static class | DDSImage.
Simple class describing images and data; does not encapsulate image format information. |
| Modifier and Type | Field and Description |
|---|---|
| private ByteBuffer | |
| private FileChannel | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| private FileInputStream | |
| private DDSImage. | |
| private static final int |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static ByteBuffer | allocateBlankBuffer(final int width, final int height, final int openGLInternalFormat)
Allocates a temporary, empty ByteBuffer suitable for use in a call to glCompressedTexImage2D. |
| public void | |
| private static int | |
| private static int | computeCompressedBlockSize(final int width, final int height, final int depth, final int compressionFormat)
|
| public static DDSImage | Returns: DDS image objectthe D3DFMT_ constant describing the data; it is
assumed that it is packed tightly d3dFormat, final int the width in pixels of the topmost mipmap image width, final int the height in pixels of the topmost mipmap image height, final ByteBuffer[] the data for each mipmap level of the resulting
DDSImage; either only one mipmap level should
be specified, or they all must be mipmapData)Creates a new DDSImage from data supplied by the user. |
| public void | |
| private void | |
| public DDSImage. | Returns: Mipmap image objects setReturns an array of ImageInfos corresponding to all mipmap levels of this DDS file. |
| public DDSImage. | Returns: Mipmap image objects setCubemap side or 0 for 2D texture side)Returns an array of ImageInfos corresponding to all mipmap levels of this DDS file. |
| public int | getCompressionFormat()
If this surface is compressed, returns the kind of compression used (DXT1..DXT5). |
| public static String | Returns: String format codeCompression format constant compressionFormat)Converts e.g. DXT1 compression format constant (see |
| public int | |
| public int | |
| public DDSImage. | Returns: Image objectMipmap index map)Gets the ith mipmap data (0..getNumMipMaps() - 1) |
| public DDSImage. | Returns: Image objectCubemap side or 0 for 2D texture side, final int Mipmap index map)Gets the ith mipmap data (0..getNumMipMaps() - 1) |
| public int | |
| public int | |
| public int | |
| private void | |
| public boolean | |
| public boolean | |
| public boolean | Returns: true if side present or false otherwiseSide to test side)Indicates whethe this cubemap side present |
| public static boolean | Returns: true if input stream is DDS image or false otherwiseStream to check in)
Deprecated
rather call
Determines from the magic number whether the given InputStream
points to a DDS image.
ImageType#getFileSuffix(InputStream)
|
| public boolean | |
| public boolean | Returns: true if flag present or false otherwiseDDSD_* flags set to test flag)Test for presence/absence of surface description flags (DDSD_*) |
| private int | |
| private int | |
| private int | |
| private boolean | |
| public static DDSImage | |
| public static DDSImage | |
| public static DDSImage | Returns: DDS image objectInput data buf)Reads a DirectDraw surface from the specified ByteBuffer, returning the resulting DDSImage. |
| private void | |
| private void | |
| private int | |
| private int | |
| public void | |
| public void |
| buf | back to summary |
|---|---|
| private ByteBuffer buf | |
| chan | back to summary |
|---|---|
| private FileChannel chan | |
| D3DFMT_A8R8G8B8 | back to summary |
|---|---|
| public static final int D3DFMT_A8R8G8B8 | |
| D3DFMT_DXT1 | back to summary |
|---|---|
| public static final int D3DFMT_DXT1 | |
| D3DFMT_DXT2 | back to summary |
|---|---|
| public static final int D3DFMT_DXT2 | |
| D3DFMT_DXT3 | back to summary |
|---|---|
| public static final int D3DFMT_DXT3 | |
| D3DFMT_DXT4 | back to summary |
|---|---|
| public static final int D3DFMT_DXT4 | |
| D3DFMT_DXT5 | back to summary |
|---|---|
| public static final int D3DFMT_DXT5 | |
| D3DFMT_R8G8B8 | back to summary |
|---|---|
| public static final int D3DFMT_R8G8B8 | |
| D3DFMT_UNKNOWN | back to summary |
|---|---|
| public static final int D3DFMT_UNKNOWN | |
| D3DFMT_X8R8G8B8 | back to summary |
|---|---|
| public static final int D3DFMT_X8R8G8B8 | |
| DDPF_ALPHA | back to summary |
|---|---|
| public static final int DDPF_ALPHA | |
| DDPF_ALPHAPIXELS | back to summary |
|---|---|
| public static final int DDPF_ALPHAPIXELS | |
| DDPF_COMPRESSED | back to summary |
|---|---|
| public static final int DDPF_COMPRESSED | |
| DDPF_FOURCC | back to summary |
|---|---|
| public static final int DDPF_FOURCC | |
| DDPF_PALETTEINDEXED1 | back to summary |
|---|---|
| public static final int DDPF_PALETTEINDEXED1 | |
| DDPF_PALETTEINDEXED2 | back to summary |
|---|---|
| public static final int DDPF_PALETTEINDEXED2 | |
| DDPF_PALETTEINDEXED4 | back to summary |
|---|---|
| public static final int DDPF_PALETTEINDEXED4 | |
| DDPF_PALETTEINDEXED8 | back to summary |
|---|---|
| public static final int DDPF_PALETTEINDEXED8 | |
| DDPF_PALETTEINDEXEDTO8 | back to summary |
|---|---|
| public static final int DDPF_PALETTEINDEXEDTO8 | |
| DDPF_RGB | back to summary |
|---|---|
| public static final int DDPF_RGB | |
| DDPF_RGBTOYUV | back to summary |
|---|---|
| public static final int DDPF_RGBTOYUV | |
| DDPF_YUV | back to summary |
|---|---|
| public static final int DDPF_YUV | |
| DDPF_ZBUFFER | back to summary |
|---|---|
| public static final int DDPF_ZBUFFER | |
| DDPF_ZPIXELS | back to summary |
|---|---|
| public static final int DDPF_ZPIXELS | |
| DDSCAPS2_CUBEMAP | back to summary |
|---|---|
| public static final int DDSCAPS2_CUBEMAP | |
| DDSCAPS2_CUBEMAP_NEGATIVEX | back to summary |
|---|---|
| public static final int DDSCAPS2_CUBEMAP_NEGATIVEX | |
| DDSCAPS2_CUBEMAP_NEGATIVEY | back to summary |
|---|---|
| public static final int DDSCAPS2_CUBEMAP_NEGATIVEY | |
| DDSCAPS2_CUBEMAP_NEGATIVEZ | back to summary |
|---|---|
| public static final int DDSCAPS2_CUBEMAP_NEGATIVEZ | |
| DDSCAPS2_CUBEMAP_POSITIVEX | back to summary |
|---|---|
| public static final int DDSCAPS2_CUBEMAP_POSITIVEX | |
| DDSCAPS2_CUBEMAP_POSITIVEY | back to summary |
|---|---|
| public static final int DDSCAPS2_CUBEMAP_POSITIVEY | |
| DDSCAPS2_CUBEMAP_POSITIVEZ | back to summary |
|---|---|
| public static final int DDSCAPS2_CUBEMAP_POSITIVEZ | |
| DDSCAPS_COMPLEX | back to summary |
|---|---|
| public static final int DDSCAPS_COMPLEX | |
| DDSCAPS_MIPMAP | back to summary |
|---|---|
| public static final int DDSCAPS_MIPMAP | |
| DDSCAPS_TEXTURE | back to summary |
|---|---|
| public static final int DDSCAPS_TEXTURE | |
| DDSD_ALPHABITDEPTH | back to summary |
|---|---|
| public static final int DDSD_ALPHABITDEPTH | |
| DDSD_BACKBUFFERCOUNT | back to summary |
|---|---|
| public static final int DDSD_BACKBUFFERCOUNT | |
| DDSD_CAPS | back to summary |
|---|---|
| public static final int DDSD_CAPS | |
| DDSD_DEPTH | back to summary |
|---|---|
| public static final int DDSD_DEPTH | |
| DDSD_HEIGHT | back to summary |
|---|---|
| public static final int DDSD_HEIGHT | |
| DDSD_LINEARSIZE | back to summary |
|---|---|
| public static final int DDSD_LINEARSIZE | |
| DDSD_LPSURFACE | back to summary |
|---|---|
| public static final int DDSD_LPSURFACE | |
| DDSD_MIPMAPCOUNT | back to summary |
|---|---|
| public static final int DDSD_MIPMAPCOUNT | |
| DDSD_PITCH | back to summary |
|---|---|
| public static final int DDSD_PITCH | |
| DDSD_PIXELFORMAT | back to summary |
|---|---|
| public static final int DDSD_PIXELFORMAT | |
| DDSD_WIDTH | back to summary |
|---|---|
| public static final int DDSD_WIDTH | |
| DDSD_ZBUFFERBITDEPTH | back to summary |
|---|---|
| public static final int DDSD_ZBUFFERBITDEPTH | |
| fis | back to summary |
|---|---|
| private FileInputStream fis | |
| header | back to summary |
|---|---|
| private DDSImage. | |
| MAGIC | back to summary |
|---|---|
| private static final int MAGIC | |
| DDSImage | back to summary |
|---|---|
| private DDSImage() | |
| allocateBlankBuffer | back to summary |
|---|---|
| public static ByteBuffer allocateBlankBuffer(final int width, final int height, final int openGLInternalFormat) Allocates a temporary, empty ByteBuffer suitable for use in a call to glCompressedTexImage2D. This is used by the Texture class to expand non-power-of-two DDS compressed textures to power-of-two sizes on hardware not supporting OpenGL 2.0 and the NPOT texture extension. The specified OpenGL internal format must be one of GL_COMPRESSED_RGB_S3TC_DXT1_EXT, GL_COMPRESSED_RGBA_S3TC_DXT1_EXT, GL_COMPRESSED_RGBA_S3TC_DXT3_EXT, or GL_COMPRESSED_RGBA_S3TC_DXT5_EXT. | |
| close | back to summary |
|---|---|
| public void close() Closes open files and resources associated with the open DDSImage. No other methods may be called on this object once this is called. | |
| computeBlockSize | back to summary |
|---|---|
| private static int computeBlockSize(final int width, final int height, final int depth, final int pixelFormat) | |
| computeCompressedBlockSize | back to summary |
|---|---|
| private static int computeCompressedBlockSize(final int width, final int height, final int depth, final int compressionFormat) | |
| createFromData | back to summary |
|---|---|
| public static DDSImage createFromData(final int d3dFormat, final int width, final int height, final ByteBuffer[] mipmapData) throws IllegalArgumentException Creates a new DDSImage from data supplied by the user. The resulting DDSImage can be written to disk using the write() method.
| |
| debugPrint | back to summary |
|---|---|
| public void debugPrint() | |
| fixupHeader | back to summary |
|---|---|
| private void fixupHeader() | |
| getAllMipMaps | back to summary |
|---|---|
| public DDSImage. Returns an array of ImageInfos corresponding to all mipmap levels of this DDS file. | |
| getAllMipMaps | back to summary |
|---|---|
| public DDSImage. Returns an array of ImageInfos corresponding to all mipmap levels of this DDS file. | |
| getCompressionFormat | back to summary |
|---|---|
| public int getCompressionFormat() If this surface is compressed, returns the kind of compression used (DXT1..DXT5). | |
| getCompressionFormatName | back to summary |
|---|---|
| public static String getCompressionFormatName(int compressionFormat) Converts e.g. DXT1 compression format constant (see
| |
| getDepth | back to summary |
|---|---|
| public int getDepth() Total number of bits per pixel. Only valid if DDPF_RGB is present. For A8R8G8B8, would be 32. | |
| getHeight | back to summary |
|---|---|
| public int getHeight() Height of the texture (or the top-most mipmap if mipmaps are present) | |
| getMipMap | back to summary |
|---|---|
| public DDSImage. Gets the ith mipmap data (0..getNumMipMaps() - 1) | |
| getMipMap | back to summary |
|---|---|
| public DDSImage. Gets the ith mipmap data (0..getNumMipMaps() - 1) | |
| getNumMipMaps | back to summary |
|---|---|
| public int getNumMipMaps() Number of mip maps in the texture | |
| getPixelFormat | back to summary |
|---|---|
| public int getPixelFormat() Gets the pixel format of this texture (D3DFMT_*) based on some heuristics. Returns D3DFMT_UNKNOWN if could not recognize the pixel format. | |
| getWidth | back to summary |
|---|---|
| public int getWidth() Width of the texture (or the top-most mipmap if mipmaps are present) | |
| initFromData | back to summary |
|---|---|
| private void initFromData(final int d3dFormat, final int width, final int height, final ByteBuffer[] mipmapData) throws IllegalArgumentException | |
| isCompressed | back to summary |
|---|---|
| public boolean isCompressed() Indicates whether this texture is compressed. | |
| isCubemap | back to summary |
|---|---|
| public boolean isCubemap() Indicates whether this texture is cubemap
| |
| isCubemapSidePresent | back to summary |
|---|---|
| public boolean isCubemapSidePresent(final int side) Indicates whethe this cubemap side present
| |
| isDDSImage | back to summary |
|---|---|
| public static boolean isDDSImage(InputStream in) throws IOException
Deprecated rather call Determines from the magic number whether the given InputStream points to a DDS image. The given InputStream must return true from markSupported() and support a minimum of four bytes of read-ahead.
| |
| isPixelFormatFlagSet | back to summary |
|---|---|
| public boolean isPixelFormatFlagSet(final int flag) Test for presence/absence of pixel format flags (DDPF_*) | |
| isSurfaceDescFlagSet | back to summary |
|---|---|
| public boolean isSurfaceDescFlagSet(final int flag) Test for presence/absence of surface description flags (DDSD_*)
| |
| mipMapHeight | back to summary |
|---|---|
| private int mipMapHeight(final int map) | |
| mipMapSizeInBytes | back to summary |
|---|---|
| private int mipMapSizeInBytes(final int map) | |
| mipMapWidth | back to summary |
|---|---|
| private int mipMapWidth(final int map) | |
| printIfRecognized | back to summary |
|---|---|
| private boolean printIfRecognized(final PrintStream tty, final int flags, final int flag, final String what) | |
| read | back to summary |
|---|---|
| public static DDSImage read(final String filename) throws IOException Reads a DirectDraw surface from the specified file name, returning the resulting DDSImage.
| |
| read | back to summary |
|---|---|
| public static DDSImage read(final File file) throws IOException Reads a DirectDraw surface from the specified file, returning the resulting DDSImage.
| |
| read | back to summary |
|---|---|
| public static DDSImage read(final ByteBuffer buf) throws IOException Reads a DirectDraw surface from the specified ByteBuffer, returning the resulting DDSImage.
| |
| readFromBuffer | back to summary |
|---|---|
| private void readFromBuffer(final ByteBuffer buf) throws IOException | |
| readFromFile | back to summary |
|---|---|
| private void readFromFile(final File file) throws IOException | |
| sideShiftInBytes | back to summary |
|---|---|
| private int sideShiftInBytes(final int side) | |
| sideSizeInBytes | back to summary |
|---|---|
| private int sideSizeInBytes() | |
| write | back to summary |
|---|---|
| public void write(final String filename) throws IOException Writes this DDSImage to the specified file name.
| |
| write | back to summary |
|---|---|
| public void write(final File file) throws IOException Writes this DDSImage to the specified file name.
| |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv int | |
| pack-priv int | |
| pack-priv int | |
| pack-priv int | |
| pack-priv int | |
| pack-priv int | |
| pack-priv int | |
| pack-priv int | |
| pack-priv int | |
| pack-priv int | |
| pack-priv int | |
| pack-priv int | |
| pack-priv int | |
| pack-priv int | |
| pack-priv int | |
| pack-priv int | |
| pack-priv int | |
| pack-priv int | |
| pack-priv int | |
| pack-priv int | |
| pack-priv int | |
| pack-priv int | |
| pack-priv int | |
| pack-priv int | |
| pack-priv int | |
| pack-priv int | |
| pack-priv int | |
| pack-priv int | |
| pack-priv int | |
| pack-priv int | |
| pack-priv int |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| private static int | |
| pack-priv void | |
| private static int | |
| pack-priv void | |
| private static int |
| alphaBitDepth | back to summary |
|---|---|
| pack-priv int alphaBitDepth | |
| backBufferCountOrDepth | back to summary |
|---|---|
| pack-priv int backBufferCountOrDepth | |
| colorSpaceHighValue | back to summary |
|---|---|
| pack-priv int colorSpaceHighValue | |
| colorSpaceLowValue | back to summary |
|---|---|
| pack-priv int colorSpaceLowValue | |
| ddsCaps1 | back to summary |
|---|---|
| pack-priv int ddsCaps1 | |
| ddsCaps2 | back to summary |
|---|---|
| pack-priv int ddsCaps2 | |
| ddsCapsReserved1 | back to summary |
|---|---|
| pack-priv int ddsCapsReserved1 | |
| ddsCapsReserved2 | back to summary |
|---|---|
| pack-priv int ddsCapsReserved2 | |
| destBltColorSpaceHighValue | back to summary |
|---|---|
| pack-priv int destBltColorSpaceHighValue | |
| destBltColorSpaceLowValue | back to summary |
|---|---|
| pack-priv int destBltColorSpaceLowValue | |
| flags | back to summary |
|---|---|
| pack-priv int flags | |
| height | back to summary |
|---|---|
| pack-priv int height | |
| mipMapCountOrAux | back to summary |
|---|---|
| pack-priv int mipMapCountOrAux | |
| pfABitMask | back to summary |
|---|---|
| pack-priv int pfABitMask | |
| pfBBitMask | back to summary |
|---|---|
| pack-priv int pfBBitMask | |
| pfFlags | back to summary |
|---|---|
| pack-priv int pfFlags | |
| pfFourCC | back to summary |
|---|---|
| pack-priv int pfFourCC | |
| pfGBitMask | back to summary |
|---|---|
| pack-priv int pfGBitMask | |
| pfRBitMask | back to summary |
|---|---|
| pack-priv int pfRBitMask | |
| pfRGBBitCount | back to summary |
|---|---|
| pack-priv int pfRGBBitCount | |
| pfSize | back to summary |
|---|---|
| pack-priv int pfSize | |
| pitchOrLinearSize | back to summary |
|---|---|
| pack-priv int pitchOrLinearSize | |
| reserved1 | back to summary |
|---|---|
| pack-priv int reserved1 | |
| size | back to summary |
|---|---|
| pack-priv int size | |
| srcBltColorSpaceHighValue | back to summary |
|---|---|
| pack-priv int srcBltColorSpaceHighValue | |
| srcBltColorSpaceLowValue | back to summary |
|---|---|
| pack-priv int srcBltColorSpaceLowValue | |
| srcOverlayColorSpaceHighValue | back to summary |
|---|---|
| pack-priv int srcOverlayColorSpaceHighValue | |
| srcOverlayColorSpaceLowValue | back to summary |
|---|---|
| pack-priv int srcOverlayColorSpaceLowValue | |
| surface | back to summary |
|---|---|
| pack-priv int surface | |
| textureStage | back to summary |
|---|---|
| pack-priv int textureStage | |
| width | back to summary |
|---|---|
| pack-priv int width | |
| Header | back to summary |
|---|---|
| pack-priv Header() | |
| pfSize | back to summary |
|---|---|
| private static int pfSize() | |
| read | back to summary |
|---|---|
| pack-priv void read(final ByteBuffer buf) throws IOException | |
| size | back to summary |
|---|---|
| private static int size() | |
| write | back to summary |
|---|---|
| pack-priv void write(final ByteBuffer buf) | |
| writtenSize | back to summary |
|---|---|
| private static int writtenSize() | |
| Modifier and Type | Field and Description |
|---|---|
| private final int | |
| private final ByteBuffer | |
| private final int | |
| private final boolean | |
| private final int |
| Access | Constructor and Description |
|---|---|
| public | ImageInfo(final ByteBuffer data, final int width, final int height, final boolean compressed, final int compressionFormat)
|
| Modifier and Type | Method and Description |
|---|---|
| public int | |
| public ByteBuffer | |
| public int | |
| public int | |
| public boolean |
| compressionFormat | back to summary |
|---|---|
| private final int compressionFormat | |
| data | back to summary |
|---|---|
| private final ByteBuffer data | |
| height | back to summary |
|---|---|
| private final int height | |
| isCompressed | back to summary |
|---|---|
| private final boolean isCompressed | |
| width | back to summary |
|---|---|
| private final int width | |
| ImageInfo | back to summary |
|---|---|
| public ImageInfo(final ByteBuffer data, final int width, final int height, final boolean compressed, final int compressionFormat) | |
| getCompressionFormat | back to summary |
|---|---|
| public int getCompressionFormat() | |
| getData | back to summary |
|---|---|
| public ByteBuffer getData() | |
| getHeight | back to summary |
|---|---|
| public int getHeight() | |
| getWidth | back to summary |
|---|---|
| public int getWidth() | |
| isCompressed | back to summary |
|---|---|
| public boolean isCompressed() | |