/cg-notes-code

Code examples and data for the cg-notes repo

Primary LanguageCMakeMIT LicenseMIT

cg-notes-code

Code examples and data for the cg-notes repo

Examples in this repo use the following libraries:

  • Assimp to import assets
  • Bullet to simulate physics
  • Easy Profiler as the CPU profiler
  • Etc2Comp to convert textures into the ETC2 format
  • GLFW to create the window
  • GLI to load and manipulate images
  • GLM as the math library
  • GLSLang to compile GLSL
  • ImGui for a basic UI
  • MeshOptimizer to perform mesh operations
  • Optick as the GPU profiler
  • STB to load and manipulate images
  • Taskflow to handle parallel programming
  • Volk to load Vulkan endpoints
  • Vulkan as the rendering backend for some examples

Examples

  • 01_GLFW: Creation of a GLFW window
  • 02_Triangle: Shows how to create, compile and link shaders into a program
  • 03_Maths: Uses GLM to compute a MVP matrix to show a rotating cube
  • 04_SingleBuffer: The same as before but using a double-sized buffer and glBindBufferRange to draw each one instead of having to use multiple glNamedBufferSubData calls
  • 05_STB: Shows how to read and write image files to use them as textures and save screenshots using the STB library

Downloading dependencies

Just run python bootstrap.py

Generating the visual studio solution

mkdir build
cd build
cmake .. -G "Visual Studio 16 2019" -A x64
start CGNotesCode.sln