Skip to content

Programming assignments for the Fall 2024 graduate course Fundamentals of Computer Graphics at Tsinghua University, taught by Professor Liu Yongjin.

License

Notifications You must be signed in to change notification settings

ovowei/CGCoursework

Repository files navigation

Computer Graphic Course Work

  • Support macOS (ARM64, x86_64) with Clang or GCC compiler
  • Maybe support Windows (x86_64) with MinGW-w64 compiler (but not tested)

Structure

This is the structure of the project.

.
├─.vscode
├─external
│  ├─freetype
│  │  ├─include
│  │  ├─lib-darwin-arm64
│  │  ├─lib-darwin-universal
│  │  ├─lib-darwin-x86_64
│  │  └─lib-windows-x86_64
│  ├─glad
│  │  ├─include
│  │  └─src
│  ├─glfw
│  │  ├─include
│  │  ├─lib-darwin-arm64
│  │  ├─lib-darwin-universal
│  │  ├─lib-darwin-x86_64
│  │  └─lib-windows-x86_64
│  ├─glm
│  │  └─glm
│  └─stb
├─.gitignore
├─C1-RotatingTriangle-OpenGL
├─C2-TriAndQuad-OpenGL
├─C4-QuadTexture-OpenGL
├─B3-DisplayModel-OpenGL
├─B4-InteractAndLight-OpenGL
├─B7-QEMSurfaceSimplify-OpenGL
├─A4-LoopSurfaceSubdivision-OpenGL
├─A6-TerrainEngine-OpenGL
└─README.md

install

You need to install CMake and a suitable compiler to develop this project. For the compiler,

The generated executable will be placed at build/bin .

If you have problems configuring the project, you can try to delete the build directory and re-run the above commands.

Compile and Run

Each task (A, B, or C) is organized into its own directory. To compile and run a specific task, follow these steps:

  1. Navigate to the task directory: For example, if you are working on the A3 task, use the following command:

    cd C1-RotatingTriangle-OpenGL
  2. Create the build directory and navigate into it:

    mkdir build
    cd build
  3. Run CMake to configure the project:

    cmake ..
  4. Build the project using make:

    make
  5. Run the executable: The generated executable will be located in the build/bin directory. Run it with:

    ./bin/project_name

Replace project_name with the actual name of the executable generated for that task. Some projects support running with parameters. Please refer to the main.cpp code for configuration.

Reminder

You will always need to run the program from your terminal rather than double clicking. Otherwise, the program will get a wrong working directory.

Please note that Mac OS only support OpenGL<=4.1.

About

Programming assignments for the Fall 2024 graduate course Fundamentals of Computer Graphics at Tsinghua University, taught by Professor Liu Yongjin.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published