legacy_textured_teapot ====================== .. py:module:: legacy_textured_teapot .. autoapi-nested-parse:: 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 ---------- .. autoapisummary:: legacy_textured_teapot.INITIAL_ZOOM legacy_textured_teapot.BASE_DIR Classes ------- .. autoapisummary:: legacy_textured_teapot.LegacyTexturedTeapotRenderer legacy_textured_teapot.LegacyTexturedTeapotWindow Functions --------- .. autoapisummary:: legacy_textured_teapot.main Module Contents --------------- .. py:data:: INITIAL_ZOOM :value: 20 .. py:data:: BASE_DIR .. py:class:: LegacyTexturedTeapotRenderer(parent: Optional[PySide6.QtWidgets.QWidget] = None) Bases: :py:obj:`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. .. py:attribute:: texture_id :value: None .. py:attribute:: texture_loader :value: None .. py:attribute:: texture_options .. py:attribute:: current_texture :value: 'UV Template' .. py:attribute:: timer .. py:method:: load_teapot_data() Load teapot data with UV coordinates .. py:method:: load_texture(texture_name: str = None) Load texture from resources .. py:method:: initializeGL() Initialize OpenGL state for textured teapot rendering .. py:method:: init_zoom() .. py:method:: initialize_state() Set up basic OpenGL state .. py:method:: initialize() Initialize mesh data and upload to GPU .. py:method:: paintGL() Render the textured teapot scene .. py:method:: draw() Draw the teapot using LegacyGLMesh .. py:method:: change_texture(texture_name: str) Change the current texture .. py:class:: LegacyTexturedTeapotWindow Bases: :py:obj:`picogl.ui.backend.qt.legacy.window.LegacyQtObjectWindow` Main window for the legacy textured teapot renderer .. py:attribute:: window_geometry .. py:method:: set_layout(layout) .. py:method:: create_gl_widget() Create OpenGL widget .. py:method:: change_texture(texture_name: str) Change the current texture .. py:function:: main() Main function to run the legacy textured teapot renderer