LabA01 Hello OpenGL

Set up an OpenGL framework

Key skills to learn

Set up OpenGL programming environment with GLFW, GLAD

Confgure CMake for cross-platform building

Draw triangles using vertex buffer objects (VBO)

[optional] Use Git with Visual Studio Code or Visual Studio

Tasks

0.a [Optional] Setting up an OpenGL framework with GLFW, GLAD

0.b [Optional] Conifgure CMake

1.1 Creating an OpenGL window

1.2 Draw a single triangle

1.3 [Optional] Commit code to and checkout code from Github

Important Note: To save time in class, you can skip task 0.a and 0.b by starting with the scaffold project proj01_scaffold.zip below or from the lab download folder on Blackboard. Download and open the project with VS code or Visual Studio 2022.

3MB
Open

Project profile

Language: C++

Build system : CMake/Visual Studio Code/Visual Studio 2022

External libaries: GLFW, GLAD

Platform: Windows

External libraries

GLAD: OpenGL function loader

GLFW: for OpenGL window management and input events handling

Tools

Visual Studio Code + CMake Tools extension : IDE (git integrated)

Visual Studio 2022 : IDE (git integrated)

CMake: for cross platform building file generation

Git : for version control

Source code

Scaffold with OpenGL and CMake ready

3MB
Open

Final source code

Last updated