PowerGL is a graphics engine implemented with C using OpenGL
Install the Google Test development package (for example libgtest-dev on
Debian/Ubuntu) and then generate build files and run the test suite:
autoreconf -i
./configure
make checkAfter running the tests you can generate coverage reports using gcovr: Install gcovr via apt:
sudo apt-get install gcovrgcovr -r . --html --html-details -o coverage/index.html --gcov-ignore-errors no_working_dir_foundPowerGL can render scenes without opening an on-screen window by using its headless backend based on EGL. This is useful for automated tests or systems without a graphical environment.
Install the Mesa EGL development package if it is not already present. On Debian/Ubuntu you can do this with:
sudo apt-get install libegl1-mesa-devTo run the demo cube example in headless mode, set the environment variable
POWERGL_HEADLESS to 1 before executing the program:
POWERGL_HEADLESS=1 ./tests/demo_cubeThe headless backend creates an off-screen EGL context and renders frames to a pbuffer surface. The example saves these frames as PNG images so they can be inspected later without requiring a display.
PowerGL can register an OpenGL debug callback to print driver messages. Set
the environment variable POWERGL_GL_DEBUG to 1 to enable it:
POWERGL_GL_DEBUG=1 ./tests/demo_cubeThe repository bundles the Nuklear
GUI library under third_party/nuklear. A small sample program demonstrating
overlay widgets is provided in examples/nuklear_demo.c.
Compile the demo manually with SDL2 and OpenGL:
gcc examples/nuklear_demo.c -Ithird_party/nuklear \
-lSDL2 -lGLEW -lGL -ldl -lm -o nuklear_demo