com.neovisionaries.android.opengl
Enum Capability

java.lang.Object
  extended by java.lang.Enum<Capability>
      extended by com.neovisionaries.android.opengl.Capability
All Implemented Interfaces:
Serializable, Comparable<Capability>

public enum Capability
extends Enum<Capability>

OpenGL ES capability.

This list matches the set of values that glEnable() accepts. All capabilities except DITHER are disabled by default.

 // E X A M P L E

 // Enable depth test.
 // This is equivalent to glEnable(GL_DEPTH_TEST).
 Capability.DEPTH_TEST.enable();
 

Author:
Takahiko Kawasaki
See Also:
glEnable

Enum Constant Summary
BLEND
          GL_BLEND.
CULL_FACE
          GL_CULL_FACE.
DEPTH_TEST
          GL_DEPTH_TEST.
DITHER
          GL_DITHER.
POLYGON_OFFSET_FILL
          GL_POLYGON_OFFSET_FILL.
SAMPLE_ALPHA_TO_COVERAGE
          GL_SAMPLE_ALPHA_TO_COVERAGE.
SAMPLE_COVERAGE
          GL_SAMPLE_COVERAGE.
SCISSOR_TEST
          GL_SCISSOR_TEST.
STENCIL_TEST
          GL_STENCIL_TEST.
 
Method Summary
 void disable()
          Disable this capability using glDisable().
 void enable()
          Enable this capability using glEnable().
 int getCapability()
          Get the integer representing this capability.
 boolean isEnabled()
          Check if this capability is enabled using glIsEnabled().
static Capability valueOf(String name)
          Returns the enum constant of this type with the specified name.
static Capability[] 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

BLEND

public static final Capability BLEND
GL_BLEND.


CULL_FACE

public static final Capability CULL_FACE
GL_CULL_FACE.


DEPTH_TEST

public static final Capability DEPTH_TEST
GL_DEPTH_TEST.


DITHER

public static final Capability DITHER
GL_DITHER.


POLYGON_OFFSET_FILL

public static final Capability POLYGON_OFFSET_FILL
GL_POLYGON_OFFSET_FILL.


SAMPLE_ALPHA_TO_COVERAGE

public static final Capability SAMPLE_ALPHA_TO_COVERAGE
GL_SAMPLE_ALPHA_TO_COVERAGE.


SAMPLE_COVERAGE

public static final Capability SAMPLE_COVERAGE
GL_SAMPLE_COVERAGE.


SCISSOR_TEST

public static final Capability SCISSOR_TEST
GL_SCISSOR_TEST.


STENCIL_TEST

public static final Capability STENCIL_TEST
GL_STENCIL_TEST.

Method Detail

values

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

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

valueOf

public static Capability valueOf(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:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

getCapability

public int getCapability()
Get the integer representing this capability.

Returns:
The integer representing this capability. One of the following.
  1. GL_BLEND
  2. GL_CULL_FACE
  3. GL_DEPTH_TEST
  4. GL_DITHER
  5. GL_POLYGON_OFFSET_FILL
  6. GL_SAMPLE_ALPHA_TO_COVERAGE
  7. GL_SAMPLE_COVERAGE
  8. GL_SCISSOR_TEST
  9. GL_STENCIL_TEST

enable

public void enable()
Enable this capability using glEnable().

See Also:
glEnable

disable

public void disable()
Disable this capability using glDisable().

See Also:
glDisable

isEnabled

public boolean isEnabled()
Check if this capability is enabled using glIsEnabled().

Returns:
True if this capability is enabled.
See Also:
glIsEnabled