nitro-gl
nitro-gl copied to clipboard
Headers only C++11 OpenGL Vector Graphics library, that can run on all OpenGL/ES version
nitro{gl}
Headers only C++11 OpenGL Vector Graphics library, that can run on all OpenGL/ES version.
Efficiently transforms a tree of shaders and samplers into a single shader at runtime.
Coming soon, Check out our website at micro-gl.github.io/docs/nitrogl
Installing nitro{gl}
nitrogl is a headers only library, which gives the following install possibilities:
- Using
cmaketo invoke theinstalltarget, that will copy everything in your system via
$ mkdir cmake-build-release
$ cd cmake-build-release
$ cmake -DCMAKE_BUILD_TYPE=Release ..
$ cmake --install .
- Copying the
include/nitroglto anywhere you want.
Consuming nitro{gl}
Following options are available:
- copy the project to a sub folder of your project. inside your
CMakeLists.txtadd
add_subdirectory(/path/to/nitrogl)
target_link_libraries(your_app nitrogl)
- If you installed
nitro{gl}with option 1 (see above) at your system, you can instead
find_package(nitrogl CONFIG REQUIRED)
target_link_libraries(your_app nitrogl::nitrogl)
- If you have not installed, you can add in your app's
CMakeLists.txt
target_include_directories(app path/to/nitrogl/folder/include/)
- If you manually copied the
include/nitroglto the default system include path,
you can usecmake/Findnitrogl.cmaketo automatically create the cmake targets
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/path/to/Findnitrogl/folder)
find_package(nitrogl REQUIRED)
target_link_libraries(your_app nitrogl::nitrogl)
- Just copy the
include/nitroglinto a sub folder of your project and include the header
files you need with relative path in your source files.
Running Examples
First make sure you have
There are two ways:
- Use your favourite IDE to load the root
CMakeLists.txtfile, and then it
will pick up all of the targets, including the examples - Using the command line:
$ mkdir cmake-build-release
$ cd cmake-build-release
$ cmake -DCMAKE_BUILD_TYPE=Release ..
$ cmake --build . --target <example_name>
$ ../examples/bin/example_name
Author: Tomer Shalev, [email protected], all rights reserved (2022)