org.jagatoo.opengl.enums
Enum TextureFilter

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

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

Insert type comment here.


Enum Constant Summary
ANISOTROPIC_16
          Uses TRILINEAR as base filter and additionally applies a 16x anisotropic filter, if available.
ANISOTROPIC_2
          Uses TRILINEAR as base filter and additionally applies a 2x anisotropic filter, if available.
ANISOTROPIC_4
          Uses TRILINEAR as base filter and additionally applies a 4x anisotropic filter, if available.
ANISOTROPIC_8
          Uses TRILINEAR as base filter and additionally applies an 8x anisotropic filter, if available.
BILINEAR
          Performs a bilinear interpolation on the four nearest texels in the level 0 texture map.
POINT
          Selects the nearest texel in the level 0 texture map.
TRILINEAR
          Performs a trilinear interpolation of the texels between four texels each from the two nearest mipmap levels.
 
Field Summary
static TextureFilter FASTEST
          Uses the fastest available method for processing geometry.
static TextureFilter NICER
          Uses the nicest available method for processing geometry (excluding anisotropy).
static TextureFilter NICEST
          Uses the nicest available method for processing geometry.
 
Method Summary
 TextureMagFilter deriveMagFilter()
           
 TextureMinFilter deriveMinFilter()
           
 int getAnisotropicLevel()
           
 int getOpenGLMagFilter()
           
 int getOpenGLMinFilter(boolean mipmapping)
           
static TextureFilter valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static TextureFilter[] 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

POINT

public static final TextureFilter POINT
Selects the nearest texel in the level 0 texture map.

Uses the value of the texture element that is nearest (in Manhattan distance) to the center of the pixel being textured.


BILINEAR

public static final TextureFilter BILINEAR
Performs a bilinear interpolation on the four nearest texels in the level 0 texture map.

Uses the weighted average of the four texture elements that are closest to the center of the pixel being textured. These can include border texture elements, depending on the values of GL_TEXTURE_WRAP_S and GL_TEXTURE_WRAP_T, and on the exact mapping.


TRILINEAR

public static final TextureFilter TRILINEAR
Performs a trilinear interpolation of the texels between four texels each from the two nearest mipmap levels.

Chooses the two mipmaps that most closely match the size of the pixel being textured and uses the BASE_LEVEL_LINEAR criterion (a weighted average of the four texture elements that are closest to the center of the pixel) to produce a texture value from each mipmap. The final texture value is a weighted average of those two values.

Falls back to BILINEAR, if mipmapping is not used!


ANISOTROPIC_2

public static final TextureFilter ANISOTROPIC_2
Uses TRILINEAR as base filter and additionally applies a 2x anisotropic filter, if available.

Falls back to TRILINEAR only, if not available.


ANISOTROPIC_4

public static final TextureFilter ANISOTROPIC_4
Uses TRILINEAR as base filter and additionally applies a 4x anisotropic filter, if available.

Falls back to ANISOTROPIC_2, if 4x is not available and to TRILINEAR only, if no anisotropic filter is available.


ANISOTROPIC_8

public static final TextureFilter ANISOTROPIC_8
Uses TRILINEAR as base filter and additionally applies an 8x anisotropic filter, if available.

Falls back to lower anisotropics, if 8x is not available and to TRILINEAR only, if no anisotropic filter is available.


ANISOTROPIC_16

public static final TextureFilter ANISOTROPIC_16
Uses TRILINEAR as base filter and additionally applies a 16x anisotropic filter, if available.

Falls back to lower anisotropics, if 16x is not available and to TRILINEAR only, if no anisotropic filter is available.

Field Detail

FASTEST

public static final TextureFilter FASTEST
Uses the fastest available method for processing geometry.


NICER

public static final TextureFilter NICER
Uses the nicest available method for processing geometry (excluding anisotropy).


NICEST

public static final TextureFilter NICEST
Uses the nicest available method for processing geometry.

Method Detail

values

public static TextureFilter[] 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 (TextureFilter c : TextureFilter.values())
    System.out.println(c);

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

valueOf

public static TextureFilter 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

getOpenGLMagFilter

public final int getOpenGLMagFilter()

getOpenGLMinFilter

public final int getOpenGLMinFilter(boolean mipmapping)

getAnisotropicLevel

public final int getAnisotropicLevel()

deriveMagFilter

public final TextureMagFilter deriveMagFilter()

deriveMinFilter

public final TextureMinFilter deriveMinFilter()