This is some code for the Graphics Programming Knights X Knight Hacks OpenGL Workshop. Follow the installation instructions below per operating system.
The completed workshop code is available in src/completed.cpp for reference.
Pick ONE of the options below. Most people should use Visual Studio Build Tools.
Open PowerShell and run the below commands to install dependencies:
winget install Microsoft.VisualStudio.2022.BuildTools --override "--add Microsoft.VisualStudio.Workload.VCTools --passive"
winget install Git.GitThen open Developer PowerShell for VS from the Windows Start Menu and run the below commands:
# Clone repo
git clone https://github.com/dvcalex/openglworkshop1.git
cd openglworkshop1
# Build project
cmake -B build
cmake --build build
# Run project
build\bin\Debug\openglworkshop1.exeMinGW (Alternative to Visual Studio)
Open PowerShell and run the below commands to install dependencies:
winget install Kitware.CMake
winget install Git.Git
winget install MSYS2.MSYS2Open MSYS2 UCRT64 from the Windows Start Menu and run the below commands:
pacman -S mingw-w64-ucrt-x86_64-gcc mingw-w64-ucrt-x86_64-makeAdd C:\msys64\ucrt64\bin to your system PATH, then restart your terminal.
# Clone repo
git clone https://github.com/dvcalex/openglworkshop1.git
cd openglworkshop1
# Build project
cmake -B build -G "MinGW Makefiles"
cmake --build build
# Run project
build\bin\openglworkshop1.exe# Install dependencies
xcode-select --install
brew install cmake
# Clone repo
git clone https://github.com/dvcalex/openglworkshop1.git
cd openglworkshop1
# Build project
rm -rf build # If rebuilding
cmake -B build
cmake --build build
# Run project
./build/bin/openglworkshop1Xcode Command Line Tools provides Clang and Git. CMake can also be installed from cmake.org.
# Debian install dependencies
sudo apt update
sudo apt install build-essential cmake git libgl1-mesa-dev libx11-dev \
libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libxext-dev \
libwayland-dev libxkbcommon-dev
# RHEL install dependencies
sudo dnf install -y gcc-c++ cmake git mesa-libGL-devel libX11-devel \
libXrandr-devel libXinerama-devel libXcursor-devel libXi-devel \
libXext-devel wayland-devel libxkbcommon-devel
# Arch install dependencies
sudo pacman -S base-devel cmake git mesa libx11 libxrandr libxinerama \
libxcursor libxi wayland libxkbcommon
# Clone repo
git clone https://github.com/dvcalex/openglworkshop1.git
cd openglworkshop1
# Build project
rm -rf build # If rebuilding
cmake -B build
cmake --build build
# Run project
./build/bin/openglworkshop1Don't worry about these unless it looks like something specific is failing.
- CMake 3.15 or higher
- C++17 compatible compiler
- Git
- GLFW 3.4
- GLAD 2.0.8 (OpenGL 4.1 Core, pre-generated in
vendor/glad/) - GLM (header-only, included in
vendordirectory) - stb_image (header-only, included in
vendordirectory) - Internet connection to fetch some dependencies