I still don’t have things working with egui yet, but egui uses glow at the lower level (at least with its default “eframe” integration) and I now have integration directly with glow working on GitHub - Gerharddc/egui-vtk at glow.
It turns out the warnings were caused by .with_profile(GlProfile::Compatibility)
not being passed during context creation as it seems VTK relies on this.
Another important factor to get VTK things visible was to call gl.clear(COLOR_BUFFER_BIT | DEPTH_BUFFER_BIT);
before calling the VTK render function. Clearing only COLOR_BUFFER_BIT
seems to be insufficient.
I also implemented a way to use gladLoadGL
instead of gladLoaderLoadGL
to ensure that the exact same OpenGL functions are loaded on the C++ as on the Rust side, but so far this does not seem to be critical to get things working. It might help to avoid nasty issues on other platforms though.