pg: The Python Graphics Framework
pg is a lightweight, high-level OpenGL graphics framework for Python. It is a work in progress.
A basic tutorial is available here:
Many OpenGL applications have a lot of features in common, but there's a lot of boilerplate involved when using OpenGL. This high-level framework lets you focus on your application-specific functionality instead.
- compile and link
- attributes and uniforms
- built-in shaders for common use-cases
- vertex buffers
- optionally interleaved
- translate, rotate, scale
- perspective and orthographic projections
- transpose, determinant, inverse
- geometric shapes
- sphere, cuboid, plane, cylinder, cone, axes
- .obj and .stl file formats
- WASD movement
- windowing and input
- multiple windows
brew tap homebrew/versions brew install glfw3 pip install Pillow PyOpenGL
Clone the repository and run main.py to see these and several other examples.