# Graphics

At the lowest level, pyglet uses OpenGL to draw in windows. The OpenGL interface is exposed via the pyglet.gl module (see The OpenGL interface).

However, using the OpenGL interface directly for drawing graphics is difficult and inefficient. The pyglet.graphics module provides a simpler means for drawing graphics that uses vertex arrays and vertex buffer objects internally to deliver better performance.

- Drawing primitives
- Vertex attributes
- Vertex lists
  - Updating vertex data
  - Data usage
  - Indexed vertex lists
- Batched rendering
  - Setting the OpenGL state
  - Hierarchical state
  - Sorting vertex lists
- Batches and groups in other modules