Welcome to Python-flavored Magnum! Please note that, while already being rather stable, this functionality is still considered experimental and some APIs might get changed without preserving full backwards compatibility.

magnum.platform module

Platform-specific application and context creation

Contents

Concrete implementations of Application and WindowlessApplication classes are available in submodules, and it’s up to you which one you choose. For example:

from magnum import platform
import magnum.platform.sdl2

class MyApp(platform.sdl2.Application):
    ...

The same goes for WindowlessApplication implementations, for example:

from magnum import platform
import magnum.platform.egl

class MyApp(platform.egl.WindowlessApplication):
    ...

Alternatively, if you want to narrow down the mention of a particular toolkit to just one line, you can also do:

from magnum.platform.sdl2 import Application

class MyApp(Application):

Modules

module egl
EGL-based platform integration
module glfw
GLFW-based platform integration
module glx
GLX-based platform integration
module sdl2
SDL2-based platform integration