|
| 1 | +[](https://pypi.python.org/pypi/demosys-py) [](https://travis-ci.org/Contraz/demosys-py) [](http://demosys-py.readthedocs.io/en/latest/?badge=latest) |
| 2 | + |
| 3 | +demosys-py |
| 4 | +========== |
| 5 | + |
| 6 | +A cross platform modern OpenGL 3.3+ core framework based on [ModernGL](https://github.com/cprogrammer1994/ModernGL). |
| 7 | + |
| 8 | +  |
| 9 | + |
| 10 | +--- |
| 11 | + |
| 12 | +Originally made for for non-interactive real time graphics combined with music |
| 13 | +("real time music videos", see [demoscene](https://en.wikipedia.org/wiki/Demoscene) |
| 14 | +but can of course be used for other purposes. |
| 15 | + |
| 16 | +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. |
| 17 | + |
| 18 | +* [Documentation](http://demosys-py.readthedocs.io/) |
| 19 | +* [Examples](https://github.com/Contraz/demosys-py-test) |
| 20 | +* [Effect Templates](https://github.com/Contraz/demosys-py/tree/master/demosys/effect_templates) |
| 21 | +* [demosys-py on Github](https://github.com/Contraz/demosys-py) |
| 22 | +* [demosys-py on PyPi](https://pypi.python.org/pypi/demosys-py) |
| 23 | + |
| 24 | +Creating a project with a spinning cube can be done in less than a minute. |
| 25 | +(Assuming you have glfw installed) |
| 26 | + |
| 27 | +```bash |
| 28 | +pip install demosys-py |
| 29 | +demosys-admin createproject myproject |
| 30 | +demosys-admin createeffect myproject/cube |
| 31 | +``` |
| 32 | + |
| 33 | +Now edit ``myproject/settings.py`` adding the effect in ``EFFECTS``. |
| 34 | + |
| 35 | +```python |
| 36 | +EFFECTS = ( |
| 37 | + 'myproject.cube', # note the comma! |
| 38 | +) |
| 39 | +``` |
| 40 | + |
| 41 | +Now run the effect! |
| 42 | + |
| 43 | +```bash |
| 44 | +./manage.py run |
| 45 | +``` |
| 46 | + |
| 47 | +Features |
| 48 | +-------- |
| 49 | + |
| 50 | +* A simple effect system based on python packages |
| 51 | +* Supports loading GLTF and obj files/scenes |
| 52 | +* Support for the rocket sync-tracker system to create interesting keyframe data (Using [pyrocket](https://github.com/Contraz/pyrocket)) |
| 53 | +* Management commands to create new projects and effects |
| 54 | +* Convenient wrappers for VAO, Shader, Texture, FBO etc |
| 55 | +* On-the-fly Shader and VAO negotiation of the needed buffer binding |
| 56 | +* Runtime re-loading shaders (press R) |
| 57 | +* Strict validation in most OpenGL operations with reasonable error feedback |
| 58 | +* Time line / Timer support |
| 59 | +* A highly pluggable framework |
| 60 | +* Support for custom management commands |
| 61 | +* Camera and system camera support so we can easily inspect our scene |
| 62 | +* Easy resource management system (shaders, textures) |
| 63 | +* Supports vertex, fragment and geometry shaders (tessellation is wip) |
| 64 | +* A geometry module for quick creation of common mesh/VAO types |
| 65 | +* (Experimental audio playback support) |
| 66 | + |
| 67 | +Requirements |
| 68 | +------------ |
| 69 | + |
| 70 | +In order to use the framework it's an advantage to know the following: |
| 71 | + |
| 72 | +* Basic or intermediate Python |
| 73 | +* Basic glsl |
| 74 | +* Basic matrix math |
| 75 | + |
| 76 | +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. |
| 77 | + |
| 78 | +Contributors |
| 79 | +------------ |
| 80 | + |
| 81 | +* [Einar Forselv](https://github.com/einarf) |
| 82 | +* [Arttu Tamminen](https://github.com/helgrima) |
| 83 | + |
| 84 | +Libraries |
| 85 | +--------- |
| 86 | + |
| 87 | +GLFW binaries must be installed. Get from your favourite location. Use version 3.2.1 or later. |
| 88 | + |
| 89 | +* [pyGLFW](https://github.com/FlorianRhiem/pyGLFW) for window and context creation + input |
| 90 | +* [PIL/Pillow](https://github.com/python-pillow/Pillow) for texture loading |
| 91 | +* [Pyrrr](https://github.com/adamlwgriffiths/Pyrr) for math (uses numpy) |
| 92 | + |
| 93 | +Optional for audio: |
| 94 | + |
| 95 | +- [pygame](https://www.pygame.org) using the mixer module for music |
0 commit comments