Skip to content
项目

关于

Python OpenGL Graphics Framework

设计与媒体

这些数字如何统计

可以做什么

  • compile and link
  • attributes and uniforms
  • built-in shaders for common use-cases
  • optionally interleaved

实测星标增长

24小时
0
7天
0
15天
0
1个月
更新延迟

各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。

README.md

原文

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

Screenshot

Gusev Crater: gusev.py

Screenshot

OBJ and STL Models: suzanne.py

Screenshot

Constructive Solid Geometry (CSG): csg.py

Screenshot

探索相关项目

加载中…