legacy_textured_teapot

Legacy Textured PicoGL Teapot Example

This example demonstrates how to load and render a textured teapot using legacy OpenGL (OpenGL 1.x/2.x) for maximum compatibility.

Features: - Uses LegacyGLMesh for rendering - Legacy OpenGL texture mapping - Works on systems without modern shader support - Interactive controls for rotation and zoom - Multiple texture options

Available texture: - resources/tu02/uvtemplate.DDS - UV template texture - resources/tu03/uvmap.DDS - UV mapping texture - resources/tu09/Holstein.DDS - Holstein pattern - resources/tu10/diffuse.DDS - Diffuse texture

Attributes

INITIAL_ZOOM

BASE_DIR

Classes

LegacyTexturedTeapotRenderer

Legacy textured teapot renderer using OpenGL 1.x/2.x

LegacyTexturedTeapotWindow

Main window for the legacy textured teapot renderer

Functions

main()

Main function to run the legacy textured teapot renderer

Module Contents

legacy_textured_teapot.INITIAL_ZOOM = 20[source]
legacy_textured_teapot.BASE_DIR[source]
class legacy_textured_teapot.LegacyTexturedTeapotRenderer(parent: PySide6.QtWidgets.QWidget | None = None)[source]

Bases: picogl.ui.backend.qt.legacy.renderer.LegacyQtObjectRenderer

Legacy textured teapot renderer using OpenGL 1.x/2.x

This class provides a textured teapot renderer that works on systems with limited OpenGL support.

texture_id = None[source]
texture_loader = None[source]
texture_options[source]
current_texture = 'UV Template'[source]
timer[source]
load_teapot_data()[source]

Load teapot data with UV coordinates

load_texture(texture_name: str = None)[source]

Load texture from resources

initializeGL()[source]

Initialize OpenGL state for textured teapot rendering

init_zoom()[source]
initialize_state()[source]

Set up basic OpenGL state

initialize()[source]

Initialize mesh data and upload to GPU

paintGL()[source]

Render the textured teapot scene

draw()[source]

Draw the teapot using LegacyGLMesh

change_texture(texture_name: str)[source]

Change the current texture

class legacy_textured_teapot.LegacyTexturedTeapotWindow[source]

Bases: picogl.ui.backend.qt.legacy.window.LegacyQtObjectWindow

Main window for the legacy textured teapot renderer

window_geometry[source]
set_layout(layout)[source]
create_gl_widget()[source]

Create OpenGL widget

change_texture(texture_name: str)[source]

Change the current texture

legacy_textured_teapot.main()[source]

Main function to run the legacy textured teapot renderer