[HELP] I'm trying to make egui_sdl2_gl and sdl2's canvas work together

This page summarizes the projects mentioned and recommended in the original post on /r/rust

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • test-sdl-egui

  • I've been trying to use both SDL2's Canvas and egui_sdl2_gl at the same time, but unfortunately it seems like they mix quite badly. The example code is here.

  • rust-sdl2

    SDL2 bindings for Rust

  • Found the answer: the problem was that SDL's Canvas is caching opengl calls until you call present(), which was preventing egui calls to be in the same frame. Calling SDL_RenderFlush fixed it. Opened a PR to rust-SDL2: https://github.com/Rust-SDL2/rust-sdl2/pull/1153

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts