A Python 3 cross platform OpenGL 3.3+ core framework based on ModernGL
Originally made for for non-interactive real time graphics combined with music ("real time music videos", see demoscene but can of course be used for other purposes.
Made for people who enjoy playing around with modern OpenGL without spending lots of time creating all the tooling to get things up and running.
- Documentation
- ModernGL Documentation
- Examples
- Effect Templates
- demosys-py on Github
- demosys-py on PyPi
Creating a project with a spinning cube can be done in less than a minute. (Assuming you have glfw installed)
pip install demosys-py
demosys-admin createproject myproject
demosys-admin createeffect myproject/cube
Now edit myproject/settings.py
adding the effect in EFFECTS
.
EFFECTS = (
'myproject.cube', # note the comma!
)
Now run the effect!
./manage.py run
- A simple effect system based on python packages
- Supports loading GLTF and obj files/scenes
- Support for the rocket sync-tracker system to create interesting keyframe data (Using pyrocket)
- Management commands to create new projects and effects
- Convenient wrappers for VAO, Shader, Texture, FBO etc
- On-the-fly Shader and VAO negotiation of the needed buffer binding
- Runtime re-loading shaders (press R)
- Strict validation in most OpenGL operations with reasonable error feedback
- Time line / Timer support
- A highly pluggable framework
- Support for custom management commands
- Camera and system camera support so we can easily inspect our scene
- Easy resource management system (shaders, textures)
- Supports vertex, fragment and geometry shaders (tessellation is wip)
- A geometry module for quick creation of common mesh/VAO types
- (Experimental audio playback support)
In order to use the framework it's an advantage to know the following:
- Basic or intermediate Python
- Basic glsl
- Basic matrix math
If you are missing any of these requirements the framework can definitely be used to learn. 0 lines of code are needed to generate a project with a spinning cube and you can star poking at things.
Installing the project in development mode (in a virtualenv):
python setup.py develop
Running tests:
pytest
Bulding docs:
cd docs
make html
GLFW binaries must be installed. Get from your favourite location. Use version 3.2.1 or later.
- pyGLFW for window and context creation + input
- PIL/Pillow for texture loading
- Pyrrr for math (uses numpy)
Optional for audio:
- pygame using the mixer module for music