This lab stands to prepare the moderngl development environment. Below the steps and requirements for initial coding tasks. Please make sure to edit the python provided files; for dependencies, you can add the files you need.
- Install moderngl and its dependencies
- Make sure that the following programs run
01_hello_world.py
06_multiple_objects.py
09_models_and_images.py
- Modify this program to change the box's texture to a correctly aligned TEC logo
- Document how to execute the 3 programs in the section below.
- For documentation and missing dependencies, follow these links:
How to run your program
#Program 1: Install the next dependencies
• pip install moderngl
• pip install moderngl[headless]
• pip install moderngl-window
• pip install pygame
#Program 2: Install the next dependencies
• pip install numpy
• pip install pyglm
#Program 3: Install the next dependencies
• pip install objloader
• pip install pillow
Change the following lines of the code according to the name and the path of your images (Tec Logo)
Line 109: put your image path, for instance: self.texture = ImageTexture('itesm.jpg')
Line 111: put your image path, for instance: self.car_geometry = ModelGeometry('lowpoly_toy_car.obj')
Line 114: put your image path, self.crate_geometry = ModelGeometry('crate.obj')
And that is it! You should be able to run the three codes without problems
- 25% -
01_hello_world.py
is running with no errors - 25% -
06_multiple_objects.py
is running with no errors - 25% -
09_models_and_images.py
is running with the requested change (TEC logo texture) - 25% - Documentation on how to run your programs