picogl.examples.legacy_teapot

Legacy PicoGL Teapot - Compatible with systems without modern shader support.

This example uses legacy OpenGL rendering (OpenGL 1.x/2.x) that works on: - Older macOS systems - Systems without modern OpenGL 3.3+ support - Systems with limited shader support

The renderer uses LegacyGLMesh which bypasses modern VAO/VBO requirements and uses legacy client states and immediate mode rendering.

Attributes

_ROOT

TEAPOT_PHONG_MATERIAL

Classes

LegacyTeapotRenderer

GLUT teapot renderer with LegacyGLMesh, PhongMaterial, and wireframe fallback.

Functions

main() → None

Main function.

Module Contents

picogl.examples.legacy_teapot._ROOT[source]
picogl.examples.legacy_teapot.TEAPOT_PHONG_MATERIAL[source]
class picogl.examples.legacy_teapot.LegacyTeapotRenderer(width: int = 800, height: int = 600, title: str = 'Legacy Teapot Renderer', material: picogl.backend.gl.phong.material.PhongMaterial | None = None)[source]

Bases: picogl.backend.legacy.core.renderer.LegacyRenderer

GLUT teapot renderer with LegacyGLMesh, PhongMaterial, and wireframe fallback.

mesh: picogl.renderer.legacy_glmesh.LegacyGLMesh | None = None[source]
material[source]
init_gl() → None[source]

Initialize GL state, apply PhongMaterial, and upload mesh once a context exists.

draw_scene() → None[source]

Draw renderer-specific geometry.

draw_fallback_teapot() → None[source]

Draw a simple wireframe teapot as fallback.

handle_key(key: bytes) → None[source]

Handle renderer-specific keyboard input.

startup_message() → None[source]

Print application startup information.

picogl.examples.legacy_teapot.main() → None[source]

Main function.