NTOU OpenGL Template - Triangle

An OpenGL template program for students learning Computer Graphics.

Prerequisites

This program uses the following libraries:

  • SDL2

  • glm>=0.9.9.7

  • Dear ImGui

  • Glad

Dear ImGui and Glad has been shipped with this project and placed inside ext/ (as external libraries) directory. SDL2 and glm requires installation. We recommend vcpkg for C++ package management. See Vcpkg’s README.md to get started.

From Vcpkg

Windows

$ vcpkg install sdl2 glm --triplet=x64-windows

Linux / macOS

$ vcpkg install sdl2 glm

From package manager (Linux)

Ubuntu/Debian

$ sudo apt-get install libsdl2-dev libglm-dev

Fedora/CentOS

$ sudo dnf install SDL2-devel glm-devel

Building

Windows

🔥

Enable Developer Mode on Windows for CMake to create symbolic links.

The easiest way is to build with Visual Studio 2019 and above. Open the project folder and CMake will configure the project automatically.

Linux / macOS

Command-line

$ cmake -S <project-root> \
        -B build/<Debug|Release> \
        -D CMAKE_BUILD_TYPE=<Debug|Release> \
        -D CMAKE_TOOLCHAIN_FILE=<path-to-vcpkg-root>/scripts/buildsystems/vcpkg.cmake