glumpy.app layer is responsible for opening a window and handling
events (mouse, keyboard and user event). It also provides convenient interfaces
to parse command line options and configure the OpenGL context.
This example shows how to change the backend programmatically.
Note that if the backend is set, the
--backendcommand line option has not effect.
This example shows how to choose and use a specific GL configuration (GL version & profile, depth buffer size, stencil, …).
This example shows how to run manually the event loop. It might come handy if you want to integrate a glumpy program into another application.
This example exhibits all available events and display them when triggered.
Note that the idle event is commented out because it generates far too many messages.
This example runs in interactive mode where python console is reactive.
This examples takes a single screenshot and immeditaley exit.
You can also take a screenshot anytime using the
F10key. The screenshot will be named after the example filename.
This is the most simple glumpy example that display a black window and wait for the user to exit the application
You can exit any glumpy program by closing the window or pressing the
ESCkey. If you want to disable the
ESCbehavior, you’ll have to connect to the key press event and override behavior.
This example creates a window and closes it after 5 seconds.
This example opens two windows, one should be black, the other white.
This example displays two points (square), one blue, one red, using two shader programs. This example also serves as a test for checking glumpy is running properly.