https://github.com/permutationlock/libavengl
Zero-dependency, cross-compilable graphics: an OpenGL4/GLES3 loader with GLFW
https://github.com/permutationlock/libavengl
opengl opengl-es vector-graphics webgl
Last synced: 24 days ago
JSON representation
Zero-dependency, cross-compilable graphics: an OpenGL4/GLES3 loader with GLFW
- Host: GitHub
- URL: https://github.com/permutationlock/libavengl
- Owner: permutationlock
- License: mit-0
- Created: 2024-09-05T10:21:13.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2026-05-01T02:27:13.000Z (3 months ago)
- Last Synced: 2026-05-01T04:14:09.492Z (3 months ago)
- Topics: opengl, opengl-es, vector-graphics, webgl
- Language: C
- Homepage:
- Size: 1.72 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.MIT
Awesome Lists containing this project
README
# libavengl: a simple cross-platform 2D graphics library
The `libavengl` library provides a dynamic loader for the OpenGL ES 3
API and an API for drawing 2D shapes, textures, text, and an immediate mode
UI. It vendors the GLFW and STB TrueType libraries, along with the
headers for OpenGL ES 3, Wayland, X11, and xkbcommon.
The provided drawing APIs all use a common subset of desktop OpenGL 4,
OpenGL ES 3, and WebGL 2. The provided GLFW wrapper will automatically
load OpenGL 4.3 as a runtime backup if ES 3.2 support fails to load.
A helper macro is provided to runtime select a compatible shader
GLSL version for the loaded API.
## Platform support
I've tested the project on `x86_64` machines running Windows, Linux
(gnu or musl libc, X11 or Wayland display manager),
and FreeBSD (X11 or Wayland). Theoretically, it should run on
other architectures as well. Apple operating systems are not
supported at the moment as I don't have an Apple device to test on.
WebGL 2 is supported with Emscripten.
## Testing the loader
To build and test the loader, run:
```Shell
make
./build test
```
You should see some colored shapes, colored rounded shapes, and a checkered
square.
## Cleaning up
To clean test build artifacts, run:
```Shell
./build clean
make clean
```
## Example
A full example application using `libavengl` is the algorithm
visualization in [`libavengraph`][1].
[1]: https://github.com/permutationlock/libavengraph