#opengl #egui #glfw #gamedev #back-end #graphics

egui_glfw_gl2

OpenGL backend for egui using GLFW

3 releases

0.1.2 Mar 30, 2024
0.1.1 Mar 27, 2024
0.1.0 Mar 24, 2024

#1055 in GUI

MIT license

60KB
1.5K SLoC

egui_glfw_gl2

Egui backend implementation for GLFW and OpenGL

Latest version MIT

Example screenshot

This is a backend implementation for Egui that can be used with Rust bindings for GLFW and OpenGL.

Since the egui_glfw_gl has not been updated for a long time, I have updated the dependencies to the latest version and made the following things:

  1. Refactored some parts of the code.
  2. Fixed the issue in the old project's demo where the "actual size" of the window did not match the visible size.
  3. Implemented the window scroll event, you can now use the mouse wheel in the egui window.
  4. Implemented copy and paste functionality.
  5. The mouse cursor is now properly displayed by using crates "winapi".

Example

I have made an example to demonstrate the usage of egui_glfw_gl. To run the example, run the following:

cargo run --example demo

Known issues

  • Due to the addition of the cursor's icon part, project is currently not compatible with Linux and MacOS.

Credits

egui_glfw_gl2 is based off egui_glfw_gl, created by cohae

The project's code heavily references the implementations of winit and egui_vulkano. Many thanks to them.

Update

0.1.2 (2024-3-31)

  • Significantly refactored the project.
  • Now OpenGL uses version 330, and the method of uploading vertex data has been modified, which theoretically improves rendering performance.

0.1.1 (2024-3-27)

  • Breaking change: Switched OpenGL binding crate from gl to gl33 (as the function and variable names in gl33 are consistent with C++).
  • Update: Updated the egui dependency to the latest version (0.27.0).

0.1.0 (2024-3-24)

  • Updated the egui dependency to 0.26.2.
  • Refactored some parts of the code.

Dependencies

~13–28MB
~404K SLoC