Skip to main content

Modern OpenGL 3.3+ Framework inspired by Django

Project description

pypi travis rtd

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 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.

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

Features

  • 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)

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

Running tests:

pytest

Bulding docs:

cd docs
make html

Contributors

Libraries

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

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-1.0.4-py3-none-any.whl (94.6 kB view hashes)

Uploaded Python 3

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