8 ms·
The egui framework they mention is pretty neat: https://emilk.github.io/egui/ https://emilk.github.io/egui/ It an entirely custom toolkit, so don't expect it
by pornel 5y ago
The egui framework they mention is pretty neat:
https://emilk.github.io/egui/ https://emilk.github.io/egui/
It an entirely custom toolkit, so don't expect it to have a native look and feel, but it's a GPU-first design with multiple back-ends. It can be used in native OpenGL apps too. It's an immediate-mode UI, so it's very easy to build and update even complex windows. Great choice if you want to prototype a game.
- FpUser 5y agoChecked demo. Bugs when interacting. For example when clicking buttons on top does not switch to supposed part. just flushes screen momentarily. Clicking refresh on browser right after that fixes the situation. Major pita is keyboard handling when selecting, cutting, pasting text in edit controls and markup editor
- throw14082020 5y ago> we built an application that overlays debugger information on an application scene render using egui, a Rust GUI library This is the context. They use egui to display debugger information - performance does not matter for the debugger information.
- IshKebab 5y agoIt does if you're debugging performance issues.
- pacificat0r 5y agoYou can easily tag imgui update/render times in profiling sessions. Then they are isolated from the rest of the work that's happening.
- throw14082020 5y agoIf you need good performance to debug "performance issues" - lack of good performance - I don't think you will solve your problem.
- jcranberry 5y agoIt can be very difficult to replicate a data race when using shared memory without decent performance when debugging.
- IshKebab 5y agoI'm not.sure what you're saying. You need good performance in your debugging tools to debug performance in your main app, otherwise when you enable the debugging tools they will dominate any measurements.
- rafale 5y agoImmediate mode is such an outdated approach for a modern UI framework. It's a deal-breaker imo.
- coldtea 5y agoImmediate vs retained is not about "modern" vs "outdated", both are about as old as computer graphics themselves. One is better in some cases, the other in others. In any case, the fashion (for the last ~10 years) is to consider immediate mode the modern approach, and retained mode an awkward practice of the 90s. So you can call "immediate mode" a lot, but you can't call it "outdated" when most consider it the new black...
- IshKebab 5y agoYou're thinking of React and Flutter and so on. They aren't immediate mode. They're more like retained mode with a non-traditional way of keeping the UI state up to date. Very different to egui.
- coldtea 5y agoReact and Flutter aren't immediate mode only because they're build on top of the DOM as primitive. Otherwise, conceptually they are evolutions of immediate mode. And they inspired plenty of GUIs outside the web to go "immediate" mode themselves.
- IshKebab 5y agoFlutter isn't built on top of the DOM. And anyway that's not why they're not immediate mode. Take a look at some egui code and you'll see huge differences, e.g. in how button clicks are handled, when code runs, etc.
- coldtea 5y ago>Flutter isn't built on top of the DOM. The web version has a DOM-based HTML Rendered in addition to a separate Canvas one. So (on the web, where the DOM is applicable anyway, it kinda is). In any case, I didn't intend to go about Flutter, which I don't use, just wanted to write about React. I mentioned it while answering because the parent comment mentioned them together, and I didn't paid much attention.
- Beltalowda 5y agoThe biggest downside of this is that everything is painted as "graphics", and you can no longer use the web inspector to modify the fonts, colours, etc. While few people (like myself) do this directly, lots of people use it indirectly through extensions like Adblock, Stylus, etc. For example, I find the fonts hard to read due to the colour choices; then I zoom in and it's better, but now this "Widget gallery" no longer fits on my screen and there is no scrollbar.
- franga2000 5y agoYes, I really hope this doesn't become common. By not utilising the DOM, you're killing accessibility, autofill, customization (things like reader mode, automatic dark themes...)... These are things that regular people rely on every day (not just us techies writing userscript a and Stylus themes).
- labawi 5y agoConcur. I block wasm and webgl, mostly for security and privacy, so don't use sites that require it. Unfortunately, as I also block trackers, most site operators won't even realize people like me visit their sites.
- Beltalowda 5y agoDoes blocking WASM improve privacy? As I understand it, it essentially has the same capabilities as regular JS(?) but I never looked very deeply in to it, so maybe there's some parts I don't know about(?)
- labawi 5y agoTheoretically, wasm shouldn't have more access, though I would be moderately concerned about bugs, and better access for timing and rowhammer. Practically, it's mostly used for tracking and making users' machines execute even more inscrutable code. IMO, if you need wasm for |"normal" pages and apps, you're doing something wrong. There are notable exceptions (say machine emulators, maybe 3d games and such), but they are spread far between most pages.
- lordnacho 5y agoCan confirm this lib is very good. I use it to simplify my status app, it allows me to keep everything in Rust so that I don't need to know too much about react and other web tech. There's demo apps that you can just grab and edit to your liking, and the docs explain what you need to build the WASM app and run it.
- agumonkey 5y agosomeone made a tutorial to make a web app in rust with egui https://www.youtube.com/watch?v=4MKcqR9z8AU https://www.youtube.com/watch?v=4MKcqR9z8AU
- f00zz 5y agoCool. Looks like a fancier version of Dear ImGui.
- deleted 5y ago[deleted]
- malermeister 5y agoIs the font rendering awful for anyone else? Firefox on Windows fwiw