Skip to main content

Modern OpenGL 3.3+ Framework inspired by Django

Project description

pypi travis Documentation Status

demosys-py

A Python 3 cross platform OpenGL 3.3+ core framework based on ModernGL

screenshot1 screenshot2


Originally made for for non-interactive real time graphics combined with music ("real time music videos", see demoscene) but can of course be used almost any purpose.

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. Using ModernGL also makes working with OpenGL a breeze accomplishing a lot with very few lines of code.

A high priority for this project is also to help improving ModernGL.

Creating a project with a spinning cube can be done in less than a minute.

pip install demosys-py
demosys-admin createproject myproject
demosys-admin createeffect myproject/cube

Now run the effect

python manage.py runeffect myproject.cube

Features

  • A simple effect system based on python packages
  • Supports most modern OpenGL features through ModernGL
  • Resource loading system for shader programs, textures, scenes and misc data
  • Loading GLTF 2.0 and wavefront obj files/scenes
  • Supports the rocket sync-tracker system to create interesting keyframe data (Using pyrocket)
  • Runtime re-loading shader programs (press R)
  • Supports headless rendering and various visible windows such as pyGLFW, PyQt5, PySDL2 and Pyglet.
  • Management commands for creting new projects and effects including the ability to make custom commands
  • A highly pluggable framework with customizable timers, resource loaders, timelines and more
  • A geometry module for quick creation of common mesh/VAO types
  • Experimental audio playback support

Requirements

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.

Local Development

Installing the project in development mode (in a virtualenv):

python setup.py develop
# PyQt5 doesn't support develop and have to manually be force-reinstalled installed after
pip install -I PyQt5

Running tests:

# All tests
pip install -r requirements-test.txt
python manage.py test

# Single tests module
python manage.py test tests/test_effect.py

Building docs:

pip install -r docs/requirements.txt
python setup.py build_sphinx

Contributors

Dependencies

  • ModernGL PyOpenGL replacement
  • PIL/Pillow for texture loading
  • Pyrrr for math (uses numpy)
  • PyQt5 is default for window/context creation (works out of the box on most platforms)

Optional:

  • pyGLFW for window/context creation
  • pyglet for window/context creation (Does not work on OS X)
  • pygame using the mixer module for music
  • python-vlc for audio playback

Mentions

Also consider supporting Read the Docs by becoming a gold member though a one time ($5 or more) donation for an ad-free experience.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

demosys_py-2.1.1-py3-none-any.whl (339.6 kB view details)

Uploaded Python 3

File details

Details for the file demosys_py-2.1.1-py3-none-any.whl.

File metadata

  • Download URL: demosys_py-2.1.1-py3-none-any.whl
  • Upload date:
  • Size: 339.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.6.8

File hashes

Hashes for demosys_py-2.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b39b236225336572408ea68e1c311d336132f9c3002b388aad7f14f090063d2c
MD5 3c7f19586299ddbc45399be69f3800c0
BLAKE2b-256 417bb7be3f9a8065225e7fa4b0c6cc9ee3e3b7e55b9e4285c1d70e45ed094ac9

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page