LabA02 Shaders and Transforms

Key skills to learn
Draw triangles with indices and attibutes
Vertex and fragment shader programming
GLM transform matrix and rotation
[Optional] Interactive GLFW keyboard events
Tasks
2.1.1 Draw Multiple Triangles using Indices
2.1.2Adding vertex colour attributes
2.2 Drawing triangles with vertex colours using vertex and fragment shaders
2.3 Using GLM to perform transformations
2.4 [Optional] Draw and rotate a cube
2.5 [Optional] Draw a pyramid and interacively rotate it with keys
External libraries
OpenGL Mathematics (GLM) : for vector and matrix calculation
Github source code
View code in VS Code
You can also access the Github repository in your VS Code and interactively choose different branches and tags.
Start VSCode, Select "Clone Repository from" https://github.com/zhaoyoubing/proj02.git

Select a folder as the parent folder of your cloned repository, after downloading, you will see

Switch to the source control view

Click on main, you will see branches and tags, select the branch or tags to view the source code for help

You source code will be updated to your selected branch or tag

Online browsing
https://github.com/zhaoyoubing/proj02/tree/tag_a_two_triangle
Select different tags/branches to browse different stages.
Direct Download
https://github.com/zhaoyoubing/proj02/tags
Use different tags/branches to download different stages in the lab. But you will not see the Git history.
Last updated