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_publiccd balboa_public; mkdir build; cd buildcmake ..- At this point, you can either open up the
balboa.slninbuildfolder 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.jsonin.vscodefolder: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+Dto start the debugger. You can set breakpoints, inspect variables, and trace callstack, etc.
You may need the following packages
sudo apt install g++ cmake libx11-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libgl-dev
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.
HW 1_5 I attempt to use blender and generate the ghost.json and ghost.ply, but it didn't work due to unable to save .ply files with color. I then draw an apple stored in apple.json using chat gpt help and projected that. All of the mentioned files are in scenes/hw2/. The result img is saved at outputs folder.