Fast, Super Slim, Embeddable, Headers files only C++11 graphics library, that
can run on any 32/64 bits computer without FPU or GPU. No standard library required.
check out our website at micro-gl.github.io/docs/microgl
Language
C++11, does not use anySTLlibrary and standard library.- headers only library
- most functions are templates, which means you compile only what is used
- compile-time polymorphism (no runtime virtual methods)
- support for 32 bits and 64 bits
- self contained and modular.
Graphics
- very modular design. if something does not exist, you can implement your own
- over 10 blending modes impemented, you can wrote your own and supply as well
porter-duffalpha compositing- support for 2d sampler
- can support any pixel coding you need, we implemeted a lot out of the box
- can render 3d geometries
- we support 3d shaders
- no need for GPU, it is all CPU
- no need for FPU
- support for any number system including
Qnumbers (fixed point), no need to use float points
Geometry
- fast implementation for common shapes (rect, rounded rectangles, circles, triangles)
- batch traingles like GPU would
- support polygons of any type convex, simple, and complex polygons
- path fills(with even-odd or zero-one fill rule) in any precision
- stroke fills
- quadrilaterals
- bezier patches
- we providea dynamic array, but you can plug your own.
microgl 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/microglto anywhere you want.
Following options are available:
- copy the project to a sub folder of your project. inside your
CMakeLists.txtadd
add_subdirectory(/path/to/microgl)
target_link_libraries(your_app microgl)- If you installed
micro{gl}with option 1 (see above) at your system, you can instead
find_package(microgl CONFIG REQUIRED)
target_link_libraries(your_app microgl::microgl)- If you have not installed, you can add in your app's
CMakeLists.txt
target_include_directories(app path/to/microgl/folder/include/)- If you manually copied the
include/microglto the default system include path,
you can usecmake/Findmicrogl.cmaketo automatically create the cmake targets
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/path/to/Findmicrogl/folder)
find_package(microgl REQUIRED)
target_link_libraries(your_app microgl::microgl)- Just copy the
include/microglinto a sub folder of your project and include the header
files you need with relative path in your source files.
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_nameAuthor: Tomer Shalev, [email protected], all rights reserved (2021)