Enum PrimitiveType

java.lang.Object
java.lang.Enum<PrimitiveType>
com.codename1.gpu.PrimitiveType
All Implemented Interfaces:
Comparable<PrimitiveType>

public enum PrimitiveType extends Enum<PrimitiveType>
The geometric primitive a Mesh is assembled from. These map directly to the equivalent draw primitives on every backend (OpenGL ES, WebGL and Metal).
  • Enum Constant Details

    • POINTS

      public static final PrimitiveType POINTS
      A list of unconnected points, one per vertex.
    • LINES

      public static final PrimitiveType LINES
      A list of unconnected line segments, two vertices per line.
    • LINE_STRIP

      public static final PrimitiveType LINE_STRIP
      A connected polyline, one segment between each consecutive vertex.
    • TRIANGLES

      public static final PrimitiveType TRIANGLES
      A list of independent triangles, three vertices per triangle.
    • TRIANGLE_STRIP

      public static final PrimitiveType TRIANGLE_STRIP
      A connected triangle strip sharing edges between consecutive triangles.
  • Method Details

    • values

      public static PrimitiveType[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

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