UCSD CSE 167 codebase https://cseweb.ucsd.edu/~tzli/cse167/
All the dependencies are included. Use CMake to build.
git clone --recurse-submodules https://github.com/BachiLi/balboa_public mkdir build
cd build
cmake ..
make -j
It requires compilers that support C++17 (gcc version >= 8, clang version >= 7, Apple Clang version >= 11.0, MSVC version >= 19.14).
- Install Visual Studio 2022 and Visual Studio Code. Choose "Desktop development with C++" and check "C++ CMake tools for Windows" on the recipe.
git clone --recurse-submodules https://github.com/BachiLi/balboa_public
cd balboa_public; mkdir build; cd build
cmake ..
- At this point, you can either open up the
balboa.sln
inbuild
folder and use Visual Studio as your IDE, or work with Visual Studio Code.
(optional) To build, run, and debug in VS Code:
- In the bottom bar, configure CMake as follows (from left to right):
- Build variant:
RelWithDebInfo
. - Active kit:
Visual Studio ... x64
, choose the appropriate one depending on your architecture. - Default build target:
balboa
.
- Build variant:
- Create a
launch.json
in.vscode
folder:You can pass arguments using{ "version": "0.2.0", "configurations": [ { "name": "hw1_1", "type": "cppvsdbg", "request": "launch", "program": "${workspaceFolder}/build/${command:cmake.buildType}/balboa.exe", "cwd": "${workspaceFolder}/build/${command:cmake.buildType}", "args": ["-hw", "1_1"] } ] }
args
. - Press
Ctrl+Shift+D
to start the debugger. You can set breakpoints, inspect variables, and trace callstack, etc.
Try
cd build
./balboa -hw 1_1
This will generate an image "hw1_1.png".
stb_image, stb_image_write, json, tinyply, GLFW, and glad
We use stb_image and stb_image_write for reading & writing images.
We use json to parse JSON files.
We use tinyply for parsing PLY files.
We use glfw and glad for the OpenGL homeworks.
3D models and textures: Stanford 3D Scanning Repository, KickAir_8p, and Texturemontage.