Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

the frameworks with wgpu backends can do this pretty trivially.

you can even use egui with bevy and have an entire game engine.

 help



> you can even use egui with bevy and have an entire game engine.

Indeed, but I specifically don't want an entire game engine. I want a UI with an embedded 3D view.

Dealing with subpar clones of the whole text rendering, IME, and accessibility stacks just to get an embedded 3D view is not worth.


You can check my IUP fork here https://github.com/gen2brain/iup-go , with many drivers/backends for the native controls. And they all have Canvas and GLCanvas controls. Well, maybe not modern, but still the only easy cross-platform API to handle different platforms with more or less the same codebase.

And of course, no need to use Go, you can use C, there is a nice wrapper for C++. You can also build IUP.xcframework and use Swift if you like, and there is a bindgen example that can generate Lua and Python bindings, or can export API model as JSON so you can generate whatever bindings. Simple C API based on IUP and attributes, but very poverfull. Nice docs and 200+ examples, retained, standard events and callbacks, should be easy to start and fast to build native apps everywhere.


well like i said, you can use something like egui's wgpu backend (which is the default) and draw whatever 2d or 3d graphics you want.

Right, but going that route gives up native text layout, native IME, native accessibility, etc. It's mostly fine for building game-like things, but I wouldn't want to build a productivity app that way.

I don't know what you're asking. I use EGUI + WGPU for a 3D molecule viewer/editor, and it works great. I don't know what a productivity app is, but I think this is one?

This is what you posted:

> The other issue in this bucket is being able to embed a 3D rendering context into the UI.

Many people pointed out that you have a big selection of tools that can do this.


> Many people pointed out that you have a big selection of tools that can do this.

The vast majority have pointed to tools that do the opposite: they render the UI into my 3D context, not tools that can render my 3D context into their UI.

This is a fundamentally different approach, with significant tradeoffs: you are accepting non-native controls, text layout, IME, accessibility, no direct compositor integration, and re-renders affect the entire UI (not just the 3D viewport).

> I use EGUI + WGPU for a 3D molecule viewer/editor, and it works great

I believe we have chatted about this specific app in some other UI threads on HN, and it looks like a great app, but it's not the sort of data-binding-heavy UI that really stresses a UI toolkit


Ah got it; I appreciate the clarification. That was indeed the part I'd missed.

what do you mean by "native text layout, native IME, native accessibility"? egui does text layout, accessibility, etc. if you mean like using the os-native UI, tauri doesn't give you that either...

> if you mean like using the os-native UI, tauri doesn't give you that either

The browser shell offers a mature text engine, native IME integration, robust accessibility support, access to a wide selection of controls that behave exactly like their native equivalents, and the canvas element is distinct from the rendering model of the surrounding UI elements.

It's not a panacea, but its significantly more advanced than something like egui.


the browser has it's strengths and weaknesses, if it works for your usecase than great. but i thought we were talking about embedding 3d context into rust ui :)

> i thought we were talking about embedding 3d context into rust u

I would rather be doing that, yes. The options to do that without moving all my UI into the 3d context are however slim




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: