picogl.backend.glut
GLUT backend wrappers for window init, callbacks, and primitives.
Submodules
Classes
Flags for |
|
GLUT mouse button identifiers. |
|
GLUT mouse button press/release state. |
Functions
glut swap buffers |
|
|
glut wire cube |
|
Register the display (redraw) callback. |
|
Register the idle callback, or |
|
Register the ASCII keyboard callback. |
|
Register the mouse motion (drag) callback. |
|
Register the mouse button callback. |
|
Request a redraw of the current window. |
|
Register the window reshape callback. |
|
Create a GLUT window and return its window id. |
|
Initialize GLUT. |
|
Set the initial display mode (e.g. RGBA | DOUBLE | DEPTH). |
|
Set the initial window size in pixels. |
|
Enter the GLUT event processing loop (does not return). |
|
Draw a solid teapot of the given size. |
|
Draw a wireframe teapot of the given size. |
Package Contents
- picogl.backend.glut.glut_display_func(func: DisplayCallback) None[source]
Register the display (redraw) callback.
- picogl.backend.glut.glut_idle_func(func: IdleCallback | None) None[source]
Register the idle callback, or
Noneto clear it.
- picogl.backend.glut.glut_keyboard_func(func: KeyboardCallback) None[source]
Register the ASCII keyboard callback.
- picogl.backend.glut.glut_motion_func(func: MotionCallback) None[source]
Register the mouse motion (drag) callback.
- picogl.backend.glut.glut_mouse_func(func: MouseCallback) None[source]
Register the mouse button callback.
- picogl.backend.glut.glut_reshape_func(func: ReshapeCallback) None[source]
Register the window reshape callback.
- class picogl.backend.glut.GLUTDisplayMode[source]
Bases:
enum.IntFlagFlags for
glut_init_display_mode().- RGBA = 0
- DOUBLE = 0
- DEPTH = 0
- class picogl.backend.glut.GLUTMouseButton[source]
Bases:
enum.IntEnumGLUT mouse button identifiers.
- LEFT = 0
- WHEEL_UP = 3
- WHEEL_DOWN = 4
- class picogl.backend.glut.GLUTMouseState[source]
Bases:
enum.IntEnumGLUT mouse button press/release state.
- DOWN = 0
- UP = 0
- picogl.backend.glut.glut_create_window(title: str | bytes) int[source]
Create a GLUT window and return its window id.
String titles are encoded as UTF-8.
- picogl.backend.glut.glut_init(argv: Sequence[str] | None = None) None[source]
Initialize GLUT.
- Parameters:
argv – Program arguments; defaults to
sys.argv.
- picogl.backend.glut.glut_init_display_mode(mode: picogl.backend.glut.enums.GLUTDisplayMode | int) None[source]
Set the initial display mode (e.g. RGBA | DOUBLE | DEPTH).
- picogl.backend.glut.glut_init_window_size(width: int, height: int) None[source]
Set the initial window size in pixels.
- picogl.backend.glut.glut_main_loop() None[source]
Enter the GLUT event processing loop (does not return).