org.jagatoo.opengl.enums
Enum TextureImageFormat

java.lang.Object
  extended by java.lang.Enum<TextureImageFormat>
      extended by org.jagatoo.opengl.enums.TextureImageFormat
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<TextureImageFormat>

public enum TextureImageFormat
extends java.lang.Enum<TextureImageFormat>

The TextureImageFormat is an enum-abstraction of the possible formats of a texture image (one mipmap level of a texture), that OpenGL supports.


Enum Constant Summary
ALPHA
          Texture contains only alpha values.
DEPTH
          Texture contains 24 bit depth.
INTENSITY
          Texture contains only intensity values.
LUMINANCE
          Texture contains only luminance values.
LUMINANCE_ALPHA
          Texture contains luminance and alpha values.
RGB
          Texture contains red, green and blue color values.
RGB_DXT1
          compressed texture format.
RGBA
          Texture contains red, green, blue and alpha color values.
RGBA_DXT1
          compressed texture format.
RGBA_DXT3
          compressed texture format.
RGBA_DXT5
          compressed texture format.
 
Method Summary
 int getPixelSize()
           
 boolean hasAlpha()
           
 boolean isCompressed()
           
 int toOpenGL()
           
static TextureImageFormat valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static TextureImageFormat[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

INTENSITY

public static final TextureImageFormat INTENSITY
Texture contains only intensity values.


LUMINANCE

public static final TextureImageFormat LUMINANCE
Texture contains only luminance values.


ALPHA

public static final TextureImageFormat ALPHA
Texture contains only alpha values.


LUMINANCE_ALPHA

public static final TextureImageFormat LUMINANCE_ALPHA
Texture contains luminance and alpha values.


DEPTH

public static final TextureImageFormat DEPTH
Texture contains 24 bit depth.


RGB

public static final TextureImageFormat RGB
Texture contains red, green and blue color values.


RGBA

public static final TextureImageFormat RGBA
Texture contains red, green, blue and alpha color values.


RGBA_DXT1

public static final TextureImageFormat RGBA_DXT1
compressed texture format. Uses S3TC_DXT1 compression.


RGBA_DXT3

public static final TextureImageFormat RGBA_DXT3
compressed texture format. Uses S3TC_DXT3 compression.


RGBA_DXT5

public static final TextureImageFormat RGBA_DXT5
compressed texture format. Uses S3TC_DXT5 compression.


RGB_DXT1

public static final TextureImageFormat RGB_DXT1
compressed texture format. Uses S3TC_DXT1 compression.

Method Detail

values

public static TextureImageFormat[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (TextureImageFormat c : TextureImageFormat.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static TextureImageFormat valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

getPixelSize

public final int getPixelSize()

hasAlpha

public final boolean hasAlpha()

isCompressed

public final boolean isCompressed()

toOpenGL

public final int toOpenGL()