RustAudio / baseview

low-level window system interface for audio plugin UIs
Apache License 2.0
259 stars 54 forks source link

Add a new example for OpenGL context using femtovg #176

Closed prokopyl closed 3 months ago

prokopyl commented 3 months ago

This PR adds a new example demonstrating how to create and use an OpenGL context by integrating with the femtovg library.

This is also helpful to have a simple, cross-platform and easily-reproducible way to test OpenGL context creation.

This example also allows to test proper window scaling and resizing (with a large blue square that covers the window with a 10% margin), as well as mouse movement tracking (inspired by the femtovg book, with a small orange square that follows the mouse).