Programming Language
Programming assignments in this course will be written using C++ (specifically the 2017 version of C++). We do not expect students to be familier with advanced C++ features, but we will make use of operator overloading and template classes from the C++ Standard Library. You will find links to online resources about C++ programming below.
Libraries
-
Vulkan SDK — Vulkan is a modern, cross-platform, graphics API. If you wish to install it on your own system, you can get the SDK from https://vulkan.lunarg.com. We are using version 1.3.261 of the Vulkan SDK (released August 2023).
-
GLFW Library — GLFW is a multiplatform library for graphics programming on the desktop. It is designed to handle window creation and input devices in a platform-independent way. If you wish to install it on your own system, you can get the library from https://www.glfw.org. We are using version 3.3.8 (released July 2022).
-
GLM Library — OpenGL Mathematics is a header-only C++ library for programming with vectors and matrices. It is designed to match the operations used in the GLSL shading language, which is what we will be using to write shader programs. We are using version 0.9.9.8 (released April 2020), which is included as part of the upstream repository for the course. There is a manual and API documentation available online.
-
CS23700 Library — We also use a course-specific utility library that builds on top of the three libraries mentioned above. This library is part of the upstream repository for the course.
Tools
-
CMake — CMake is a makefile generator; we require version 3.21 (or later).
Installing on macOS
It is fairly easy to install the software for the course on a personal mac.
To start, you need to have the command-line developer tools installed
(these include the git
command and the C++ compiler).
You can install these using the command
xcode-select --install
For Vulkan, you can download the Vulkan SDK installer for macOS from
vulkan.lunarg.com
.
When you run the installer, you will be prompted to select components
for installation. Make sure that the "System Global Installation"
component is selected (otherwise, CMake will not be able to find
the installation).
CMake and GLFW, and CMake can be installed using the Homebrew package manager.
Programming Resources
- CS237 Library API Documentation
-
Doxygen generated documentation for the CS237 Library.
- A Note on Push Constants
-
This is a short note that explains how to use push constants to communicate data to a shader program.
- Vulkan Tutorial
-
This tutorial, which is also available in PDF and EBook formats, goes into significant detail about how to set up and use Vulkan for graphics. In this course, much of the boilerplate code described in this tutorial is provided for you in the
cs237
library. - Vulkan Specification
-
This document is the authoritative description of the Vulkan API. It is quite detailed and sometimes hard to understand, but it is the place to go if you are trying to understand how something works. Links to various Vulkan tutorials and documentation can be be found here and manual pages for the C API are here. We are using the C++ interface to Vulkan, which is described here.
- GLSL Specification (Version 4.60)
-
We use the OpenGL Shading Language to write shaders for Vulkan. There online manual pages for the GLSL functions, but note that this documentation also includes the manual pages for OpenGL (functions with a
gl
prefix are OpenGL). - GLFW Documentation
-
We use the GLFW library to interact with the window system and input devices in a portable way.
- GLM documentation
-
This page has links to both the API documentation and the GLM manual. There is also a PDF version of the manual here.
- C++ reference
-
This site is a reference for both the C++ language and Standard Template Library (STL). It covers every modern version of C++, so be careful to avoid features introduced after 2017.
- Standard C++ Library reference
-
This site is a reference for C++'s Standard Template Library (STL) and also hosts some C++ tutorials can also be found at that site. Unfortunately, it covers the 2011 and 2014 versions of the STL, but not the 2017 version that we are using, so there are some types and functions that we use that are not mentioned.
- CMake Online Documentation
-
- GDB to LLDB command map
-
LLDB is the standard debugger on macOS (it is part of the clang project). This web page describes the LLDB commands in terms of there GDB equivalents.