# 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 Summary

  Enum Constants
  Enum Constant
  Description
  `LINE_STRIP`
  A connected polyline, one segment between each consecutive vertex.
  `LINES`
  A list of unconnected line segments, two vertices per line.
  `POINTS`
  A list of unconnected points, one per vertex.
  `TRIANGLE_STRIP`
  A connected triangle strip sharing edges between consecutive triangles.
  `TRIANGLES`
  A list of independent triangles, three vertices per triangle.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static PrimitiveType`
  `valueOf(String name)`
  Returns the enum constant of this type with the specified name.
  `static PrimitiveType[]`
  `values()`
  Returns an array containing the constants of this enum type, in the order they are declared.

  ### Methods inherited from class Enum

  `clone, compareTo, equals, getDeclaringClass, getEnumValues, hashCode, name, ordinal, setEnumValues, toString, valueOf`

  ### Methods inherited from class Object

  `getClass, notify, notifyAll, wait, wait, wait`

- ## 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