Skip to content

ofarukkalkan/PowerGL

Repository files navigation

PowerGL

PowerGL is a graphics engine implemented with C using OpenGL

C/C++ CI

Running Tests

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 check

Coverage

After running the tests you can generate coverage reports using gcovr: Install gcovr via apt:

sudo apt-get install gcovr
gcovr -r . --html --html-details -o coverage/index.html --gcov-ignore-errors no_working_dir_found

Headless Configuration

PowerGL 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-dev

To 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_cube

The 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.

OpenGL Debug Output

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_cube

Nuklear Demo

The 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

About

PowerGL is a graphics engine implemented with C using OpenGL

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors