com.threerings.opengl.util
Class DDSLoader.Header

java.lang.Object
  extended by com.threerings.opengl.util.DDSLoader.Header
Enclosing class:
DDSLoader

protected static class DDSLoader.Header
extends Object

The DDS file header.


Field Summary
 int alphaBitMask
          The alpha bit mask.
 int bBitMask
          The red, green, and blue bit masks.
 int caps1
          The first set of capability bits.
 int caps2
          The second set of capability bits.
 int depth
          The depth.
 int flags
          The image flags.
 String fourCC
          The four CC code, if any.
 int gBitMask
          The red, green, and blue bit masks.
 int height
          The base image height.
 int mipMapCount
          The number of mipmaps.
 int pitchOrLinearSize
          The pitch or linear size.
 int pixelFormatFlags
          The pixel format flags.
 int rBitMask
          The red, green, and blue bit masks.
 int rgbBitCount
          The RGB bit count.
 int width
          The base image width.
 
Constructor Summary
DDSLoader.Header(ByteBuffer buf)
          Reads the header from the specified buffer.
 
Method Summary
 int getCompressedFormat()
          Returns the OpenGL compressed format corresponding to the texture.
 int getLevels()
          Returns the number of stored mipmap levels.
 int getUncompressedFormat()
          Returns the OpenGL uncompressed format corresponding to the texture, or -1 if unknown.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

flags

public int flags
The image flags.


height

public int height
The base image height.


width

public int width
The base image width.


pitchOrLinearSize

public int pitchOrLinearSize
The pitch or linear size.


depth

public int depth
The depth.


mipMapCount

public int mipMapCount
The number of mipmaps.


pixelFormatFlags

public int pixelFormatFlags
The pixel format flags.


fourCC

public String fourCC
The four CC code, if any.


rgbBitCount

public int rgbBitCount
The RGB bit count.


rBitMask

public int rBitMask
The red, green, and blue bit masks.


gBitMask

public int gBitMask
The red, green, and blue bit masks.


bBitMask

public int bBitMask
The red, green, and blue bit masks.


alphaBitMask

public int alphaBitMask
The alpha bit mask.


caps1

public int caps1
The first set of capability bits.


caps2

public int caps2
The second set of capability bits.

Constructor Detail

DDSLoader.Header

public DDSLoader.Header(ByteBuffer buf)
                 throws IOException
Reads the header from the specified buffer.

Throws:
IOException
Method Detail

getLevels

public int getLevels()
Returns the number of stored mipmap levels.


getUncompressedFormat

public int getUncompressedFormat()
                          throws IOException
Returns the OpenGL uncompressed format corresponding to the texture, or -1 if unknown.

Throws:
IOException - if the format is unknown or unsupported.

getCompressedFormat

public int getCompressedFormat()
                        throws IOException
Returns the OpenGL compressed format corresponding to the texture.

Throws:
IOException - if the format is unknown or unsupported.