https://github.com/fogleman/pg
Python OpenGL Graphics Framework
https://github.com/fogleman/pg
Last synced: 12 months ago
JSON representation
Python OpenGL Graphics Framework
- Host: GitHub
- URL: https://github.com/fogleman/pg
- Owner: fogleman
- License: mit
- Created: 2014-08-04T00:08:58.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2023-10-03T20:52:47.000Z (over 2 years ago)
- Last Synced: 2024-04-26T10:22:38.430Z (almost 2 years ago)
- Language: Python
- Homepage: http://pg.readthedocs.org/
- Size: 3.87 MB
- Stars: 208
- Watchers: 14
- Forks: 33
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
## pg: The Python Graphics Framework
pg is a lightweight, high-level OpenGL graphics framework for Python. It is a
work in progress.
### Tutorial
A basic tutorial is available here:
http://pg.readthedocs.org/en/latest/tutorial.html
### Features
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.
* shaders
* compile and link
* attributes and uniforms
* built-in shaders for common use-cases
* vertex buffers
* optionally interleaved
* matrices
* translate, rotate, scale
* perspective and orthographic projections
* transpose, determinant, inverse
* textures
* geometric shapes
* sphere, cuboid, plane, cylinder, cone, axes
* models
* .obj and .stl file formats
* WASD movement
* built-in!
* windowing and input
* glfw-based
* multiple windows
### Dependencies
brew tap homebrew/versions
brew install glfw3
pip install Pillow PyOpenGL
### Examples
Clone the repository and run main.py to see these and several other examples.
#### 3D Pipes: [pipes.py](https://github.com/fogleman/pg/blob/master/examples/pipes.py)

#### Gusev Crater: [gusev.py](https://github.com/fogleman/pg/blob/master/examples/gusev.py)

#### OBJ and STL Models: [suzanne.py](https://github.com/fogleman/pg/blob/master/examples/suzanne.py)

#### Constructive Solid Geometry (CSG): [csg.py](https://github.com/fogleman/pg/blob/master/examples/csg.py)
