.. Copyright (c) 2018-2025 William Emerison Six Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is available at https://www.gnu.org/licenses/fdl-1.3.html. ******************************** OpenGL3.3 Core Profile - Demo 21 ******************************** Objective ^^^^^^^^^ In OpenGL 3.3 Core Profile, shaders are no longer optional, they are mandatory. How to Execute ^^^^^^^^^^^^^^ Load src/modelviewprojection/demo21/demo21.py in Spyder and hit the play button. Move the Paddles using the Keyboard ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ============== ============================================== Keyboard Input Action ============== ============================================== *w* Move Left Paddle Up *s* Move Left Paddle Down *k* Move Right Paddle Down *i* Move Right Paddle Up *d* Increase Left Paddle's Rotation *a* Decrease Left Paddle's Rotation *l* Increase Right Paddle's Rotation *j* Decrease Right Paddle's Rotation *UP* Move the camera up, moving the objects down *DOWN* Move the camera down, moving the objects up *LEFT* Move the camera left, moving the objects right *RIGHT* Move the camera right, moving the objects left *q* Rotate the square around its center *e* Rotate the square around paddle 1's center ============== ============================================== Description ^^^^^^^^^^^ .. literalinclude:: ../../src/modelviewprojection/demo21/demo.py :language: python .. literalinclude:: ../../src/modelviewprojection/demo21/triangle.vert :language: glsl .. literalinclude:: ../../src/modelviewprojection/demo21/triangle.frag :language: glsl .. literalinclude:: ../../src/modelviewprojection/demo21/ground.vert :language: glsl .. literalinclude:: ../../src/modelviewprojection/demo21/ground.frag :language: glsl Code ^^^^ The Event Loop ~~~~~~~~~~~~~~