Skip to main content

Modern OpenGL 4.1+ Prototype Framework inspired by Django

Project description

pypi travis rtd

demosys-py

A python 3 implementation of a C++ project used to create and prototype demos (see demoscene) in OpenGL. The design of this version is heavily inspired by the Django project.

screenshot1

screenshot2

We only support OpenGL 3.3+ forward compatible core profiles (no backwards compatibility).

This was originally made for for non-interactive real time graphics combined with music (“real time music videos”). It’s made for people who enjoy playing around with modern OpenGL without having to spend lots of time creating all the tooling to get things up and running.

If you are not a fan of using a framework, you can create your own context and just use the classes in demosys.opengl. These will give you fairly straight forward ways to use VAOs, Shaders, Textures and FBOs.

Documentation

Project documentation can be found at readthedocs. Optionally you can build your own docs from the docs directory. If anything is unclear or incorrect in the docs, please make an issue on it. This also applies when the docs are simply bad or too vague. Please also feel free to make pull requests on documentation.

Features

  • A simple effect system based on python packages

  • Well documented

  • Managment commands to create new projects and effects

  • Convenient wrappers for VAO, Shader, Texture, FBO

  • On-the-fly Shader and VAO negotiation of the needed buffer binding

  • Strict validation in most OpenGL operations with reasonable error feedback

  • Timeline / Timer support

  • Support for the rocket sync-tracker system to create interesting keyframe data

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

  • Basic glsl knowledge

  • Basic knowledge about matrix math

If you are missing any of these requirements, the framework can definitely be used to learn. Zero/0 lines of code are needed to generate a project with a spinning cube and you can get started playing with things.

Contributing

Any contribution to the project is welcome. Never hesitate to ask questions or submit pull requests (completed or work in progress). The worst thing that can happen is that we or you might learn something. This is supposed to be a fun project.

Also check out the TODO list. Take a stab on what of the features or documentation or suggest new entries.

Known Issues

The sound player an be a bit wonky at times on startup refusing to play on some platforms. We have tried a few libraries and ended up using pygame’s mixer module. (Optional setup for this)

Audio Requirements:

  • As the current position in the music is what all draw timers are based on, we need a library that can deliver very accurate value for this.

  • Efficient and accurate seeking + pause support

  • Some way to extract simple data from the music for visualisation

Libraries

GLFW binaries must also be installed. Get from your favourite location. Use version 3.2.1 or later.

Optional for audio:

What inspired us to make this project?

  • We are old farts from the demoscene

  • We love Python

  • We were wondering what would be done with OpenGL in Python

  • We work a lot with Django and love it

Why not combine ideas from our own demosys written in C++ and Django making a Python 3 version?

Credits

  • Also thanks to Attila Toth for an excellent tutorial on OpenGL in Python.

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-0.3.8-py3-none-any.whl (54.9 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