picogl.backend.glut.glut_renderer ================================= .. py:module:: picogl.backend.glut.glut_renderer .. autoapi-nested-parse:: Legacy PicoGL Cube - 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. Classes ------- .. autoapisummary:: picogl.backend.glut.glut_renderer.GlutRenderer Functions --------- .. autoapisummary:: picogl.backend.glut.glut_renderer.main Module Contents --------------- .. py:class:: GlutRenderer(width=800, height=600, title='Legacy Glut Renderer') Legacy cube renderer using PicoGL LegacyGLMesh. .. py:attribute:: viewport .. py:attribute:: projection_config .. py:attribute:: projection .. py:attribute:: width :value: 800 .. py:attribute:: height :value: 600 .. py:attribute:: title :value: 'Legacy Glut Renderer' .. py:attribute:: rotation .. py:attribute:: zoom_distance :value: 5.0 .. py:attribute:: wireframe_mode :value: False .. py:attribute:: auto_rotate :value: False .. py:attribute:: mesh :value: None .. py:attribute:: vertices .. py:attribute:: colors .. py:attribute:: view .. py:method:: init_glut() Initialize GLUT window. .. py:method:: initialize_glut() .. py:method:: init_gl() Initialize OpenGL state. .. py:method:: load_cube_data() Load cube data using PicoGL LegacyGLMesh. .. py:method:: display() Display callback - render the scene. .. py:method:: apply_rotations() Apply rotations .. py:method:: draw_mesh() Draw the cube .. py:method:: update_size(height, width) .. py:method:: reshape(width, height) Reshape callback - handle window resize. .. py:method:: update_perspective(height, width) .. py:method:: update_viewport(height=None, width=None) .. py:method:: keyboard(key, x, y) Keyboard callback. .. py:method:: mouse(button, state, x, y) Mouse callback. .. py:method:: motion(x, y) Mouse motion callback. .. py:method:: idle() Idle callback for animation. .. py:method:: run() Run the application. .. py:function:: main() Main function.