Backends¶
Content
- Freeglut — Freeglut
- OSX Glut — OSX Glut
- GLFW — GLFW
- Pyglet — Pyglet
- Pygame — PyGame (SDL 1.x)
- SDL2 — SDL 2.0
- PySide — PySide (Qt 4.x)
- Template — Backend template
Freeglut¶
FreeGLUT is a free-software/open-source alternative to the OpenGL Utility Toolkit (GLUT) library. GLUT was originally written by Mark Kilgard to support the sample programs in the second edition OpenGL RedBook. Since then, GLUT has been used in a wide variety of practical applications because it is simple, widely available and highly portable.
Usage
from glumpy import app app.use("freeglut") window = app.Window()
Capability
Multiple windows | ✘ | Set GL API | ✘ |
Non-decorated windows | ✓ | Set GL Profile | ✘ |
Resize windows | ✓ | Share GL Context | ✘ |
Move windows | ✓ | Unicode handling | ✘ |
Fullscreen | ✓ | Scroll event | ✓ |
OSX Glut¶
The OSX GLUT backend is only available Apple machine and differs a bit from the original glut implementation. It is very limited, deprecated and does not support the mouse scroll event. After OSX El Capitan, it will most likely become unavailable.
Usage
from glumpy import app app.use("osxglut") window = app.Window()
Capability
Multiple windows | ✘ | Set GL API | ✘ |
Non-decorated windows | ✓ | Set GL Profile | ✘ |
Resize windows | ✓ | Share GL Context | ✘ |
Move windows | ✓ | Unicode handling | ✘ |
Fullscreen | ✓ | Scroll event | ✘ |
GLFW¶
GLFW is an Open Source, multi-platform library for creating windows with OpenGL contexts and receiving input and events. It is easy to integrate into existing applications and does not lay claim to the main loop.
Usage
from glumpy import app app.use("glfw") window = app.Window()
Capability
Multiple windows | ✓ | Set GL API | ✓ |
Non-decorated windows | ✓ | Set GL Profile | ✓ |
Resize windows | ✓ | Share GL Context | ✓ |
Move windows | ✓ | Unicode handling | ✓ |
Fullscreen | ✓ | Scroll event | ✓ |
Pyglet¶
Pyglet is a pure python cross-platform application framework intended for game development. It supports windowing, user interface event handling, OpenGL graphics, loading images and videos and playing sounds and music. It works on Windows, OS X and Linux.
Usage
from glumpy import app app.use("pyglet") window = app.Window()
Capability
Multiple windows | ✓ | Set GL API | ✘ |
Non-decorated windows | ✓ | Set GL Profile | ✘ |
Resize windows | ✓ | Share GL Context | ✓ |
Move windows | ✓ | Unicode handling | ✓ |
Fullscreen | ✓ | Scroll event | ✓ |
Pygame¶
Pygame is a set of Python modules designed for writing games. Pygame adds functionality on top of the excellent SDL library. This allows you to create fully featured games and multimedia programs in the python language.
Usage
from glumpy import app app.use("sdl") window = app.Window()
Capability
Multiple windows | ✘ | Set GL API | ✘ |
Non-decorated windows | ✓ | Set GL Profile | ✘ |
Resize windows | ✘ | Share GL Context | ✘ |
Move windows | ✘ | Unicode handling | ✓ |
Fullscreen | ✓ | Scroll event | ✘ |
SDL2¶
PySDL2 is a wrapper around the SDL2 library and as such similar to the discontinued PySDL project. In contrast to PySDL, it has no licensing restrictions, nor does it rely on C code, but uses ctypes instead.
Usage
from glumpy import app app.use("sdl2") window = app.Window()
Capability
Multiple windows | ✓ | Set GL API | ✓ |
Non-decorated windows | ✓ | Set GL Profile | ✓ |
Resize windows | ✓ | Share GL Context | ✓ |
Move windows | ✓ | Unicode handling | ✓ |
Fullscreen | ✓ | Scroll event | ✓ |
PySide¶
PySide is the Python Qt bindings project, providing access the complete Qt 4.8 framework as well as to generator tools for rapidly generating bindings for any C++ libraries.
Usage
from glumpy import app app.use("pyside") window = app.Window()
Capability
Multiple windows | ✓ | Set GL API | ✓ |
Non-decorated windows | ✓ | Set GL Profile | ✓ |
Resize windows | ✓ | Share GL Context | ✓ |
Move windows | ✓ | Unicode handling | ✓ |
Fullscreen | ✓ | Scroll event | ✓ |
Template¶
Template backend for writing a new backend.