https://github.com/voithos/quarkgl
A subatomic OpenGL graphics library.
https://github.com/voithos/quarkgl
graphics-programming opengl pbr rendering
Last synced: 13 days ago
JSON representation
A subatomic OpenGL graphics library.
- Host: GitHub
- URL: https://github.com/voithos/quarkgl
- Owner: voithos
- License: mit
- Created: 2017-07-26T05:52:25.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2023-07-03T16:50:50.000Z (almost 2 years ago)
- Last Synced: 2025-04-06T23:05:05.065Z (about 1 month ago)
- Topics: graphics-programming, opengl, pbr, rendering
- Language: C++
- Homepage:
- Size: 93.5 MB
- Stars: 107
- Watchers: 4
- Forks: 8
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: MIT-LICENSE.txt
Awesome Lists containing this project
README
# quarkGL
A subatomic OpenGL graphics library and playground.
[Demo video](https://www.youtube.com/watch?v=rbC2D_ayePI&ab_channel=voithoz)
[](https://www.youtube.com/watch?v=rbC2D_ayePI&ab_channel=voithoz)
## Features
- Core
- Shader loader & include system
- Model loading via Assimp
- Mesh and shader primitives
- Framebuffer and texture system
- Light, uniforms, and texture registry
- Reusable GLSL shader library
- Rendering
- Blinn-Phong lighting model
- PBR lighting model (Cook-Torrance GGX)
- Deferred shading
- Runtime IBL, reflection probe prefiltering functions
- Shadow mapping
- Normal mapping
- Compute shaders
- SSAO
- Instanced rendering
- Post-processing
- HDR support
- Bloom
- Tone mapping
- Gamma correction
- FXAA
- Model viewer
- Camera system with fly and orbit controls
- ImGui renderer UI
- Debugging
- Debug event integration
- Render pass debug groupsSee [examples](examples/) for sample screenshots.
## Building
quarkGL uses [Bazel](https://bazel.build/) as its build system. To begin, first
[install Bazel](https://docs.bazel.build/install.html).Bazel needs some platform-specific flags, which you can see in the
`.bazelrc.` files. Copy the one for your platform, for example:```
$ cp .bazelrc.windows .bazelrc
```For Linux, to be able to actually compile the dependencies, run the following to
install the appropriate tools and headers (on Ubuntu/Debian):```
$ sudo apt-get install build-essential xorg-dev libgl1-mesa-dev libglu1-mesa-dev
```To get the linter, also run:
```
$ sudo apt-get install clang-tidy
```You can build and run the main model renderer, which uses many of the features
of the library.```
$ bazel run //model_render -- --model path/to/model.gltf
```Or you can check out any of the other [examples](examples/).
## Developing
In addition to the build tooling, you may also want to build a
[compilation database](http://clang.llvm.org/docs/JSONCompilationDatabase.html)
in order to enable the linter and semantic completion in your editor.Use
[bazel-compilation-database](https://github.com/grailbio/bazel-compilation-database)
to extract the `compile_commands.json` file.```
$ bazel-compdb -s
```Once the `compile_commands.json` file exists, run the following to execute the
linter:```
$ ./run_linter.sh
```## About
This library was built as a way to learn modern OpenGL and graphics techniques.
Note that it is _not_ production capable, although parts may be useful as a
reference.A big thank you goes to the wonderful tutorials by Joey de Vries at
[learnopengl.com](https://learnopengl.com), and to the wider graphics community!## Open Source
quarkGL uses several open source libraries itself. Thanks goes to the following
projects that were used:- GLFW
- GLAD
- GLM
- stb_image
- assimp
- Dear ImGui
- imGuIZMO.quat