# Class pyglet.graphics.vertexdomain.VertexDomain

Known Subclasses:
  IndexedVertexDomain

Management of a set of vertex lists.

Construction of a vertex domain is usually done with the create_domain function.

## Methods

| __init__(self, attribute_usages)
| __del__(self)
VertexList | create(self, count) Create a VertexList in this domain.
| draw(self, mode, vertex_list=None) Draw vertices in the domain.
| __repr__(self)

## Method Details

### create

create(self, count)
Create a VertexList in this domain.

Parameters:
  count : int
    Number of vertices to create.
Returns: VertexList

### draw

draw(self, mode, vertex_list=None)

Draw vertices in the domain.

If vertex_list is not specified, all vertices in the domain are drawn. This is the most efficient way to render primitives.

If vertex_list specifies a VertexList, only primitives in that list will be drawn.

Parameters:
  mode : int
    OpenGL drawing mode, e.g. `GL_POINTS`, `GL_LINES`, etc.
  vertex_list : VertexList
    Vertex list to draw, or `None` for all lists in this domain.