Skip to content

printfdebugging/learnopengl

Repository files navigation

LearnOpenGL

Project Structure

The project uses external libraries cloned as git submodules in /libs directory. Common project assets like logo are stored in /assets, CMake specific files live in /cmake and these include header only projects, config template files, graph generation steps etc. /source contains all the source files

The project is organized into modules like source/core, source/loader, source/tutorials. core provides the core functionality like windowing and logging while loader as the name suggests, provids the loading functionality. core and loader are built as libraries used by executable modules in the tutorials module.

 assets
 cmake
 libs
 scripts
 source
│  core
│ │  include
│ │  source
│ │  CMakeLists.txt
│  loader
│ │  include
│ │  source
│ │  CMakeLists.txt
│ ...
│  tutorials
│ │  hello-triangle
│ │ │  assets
│ │ │  source
│ │ │  CMakeLists.txt
│ │ │ 󰂺 README.md
│ │ ...
 CMakeLists.txt

Dependencies

See dependencies.sh, it's a shell script to install all the required dependencies on archlinux and MSYS2 (Winodws). I will later create a dependencies.bat file to install dependencies on windows.

How to Build

cd learnopengl
cmake -B build -S .                    # for normal build
emcmake cmake -B build -S .            # for wasm build
cmake --build build -j $(nproc)        # build
cmake --install build --prefix install # install

Naming Convention

Single word variables are named as usual like texture or shader but when there are multiple words involved, we use the shrinked words in camel case, like txUnits or shVarName. This is applicable for both variable and function names. For entities like mesh, the base name is already not that long, so we don't shorten that further.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published