SecondHalfGames / yakui

yakui is a declarative Rust UI library for games
Apache License 2.0
237 stars 21 forks source link

Questions regarding this project #50

Closed Raj2032 closed 2 years ago

Raj2032 commented 2 years ago

Hi I have some questions regarding this project:

  1. Can it easily be integrated into a game engine or not?
  2. Does it have any caching layouts which is similar to retained graphics?
  3. Does it work for Android, if not are there plans for support for Android?
LPGhatguy commented 2 years ago

Hello, thanks for filing an issue!

  1. Can it easily be integrated into a game engine or not?

Yes! Easy integration is a top priority. Currently, if the engine uses wgpu and winit, integration is very easy. Otherwise, you'll have to write an integration for your graphics API and windowing library.

If you need support for another windowing library like SDL2, I'd be willing to integrate it into this repository.

  1. Does it have any caching layouts which is similar to retained graphics?

Currently, the widget tree is retained between frames. Layout is calculated on every frame, and the entire UI is rerendered every frame. We'll eventually cache layouts and only recompute them when needed.

  1. Does it work for Android, if not are there plans for support for Android?

yakui should work on Android, but I have not tested it. As long as you have a functioning renderer, like wgpu, and a functioning windowing library, like winit, yakui will function.

Raj2032 commented 2 years ago

@LPGhatguy

Hello, thanks for filing an issue!

No worries and thank you for your response :)

Yes! Easy integration is a top priority. Currently, if the engine uses wgpu and winit, integration is very easy. Otherwise, you'll have to write an integration for your graphics API and windowing library.

That seems to be good for my case.

Another question would be that if yakui has its own built in renderer if I want to make a standard application (not for game engines etc)?

Currently, the widget tree is retained between frames. Layout is calculated on every frame, and the entire UI is rerendered every frame. We'll eventually cache layouts and only recompute them when needed.

So in other words it will function like retained graphics as well?

yakui should work on Android, but I have not tested it. As long as you have a functioning renderer, like wgpu, and a functioning windowing library, like winit, yakui will function.

Right I see, thanks for your help :)


Sorry I have another question, does yakui have a locked in framework, like iced or bevy or are you free to code the way you want to?

LPGhatguy commented 2 years ago

Another question would be that if yakui has its own built in renderer if I want to make a standard application (not for game engines etc)?

yakui's primary focus is games. It should still be possible to make a normal application with yakui; you can use yakui-wgpu as the renderer.

So in other words it will function like retained graphics as well?

Sorta! The line between retained and immediate mode is fuzzy. yakui currently streams geometry into a buffer every frame, but caches other things.

Sorry I have another question, does yakui have a locked in framework, like iced or bevy or are you free to code the way you want to?

You can integrate yakui into any kind of application. The only constraint is that you start a DOM, call some functions, then paint it to the screen. There's no framework for managing state or updates with yakui.

Raj2032 commented 2 years ago

Sorta! The line between retained and immediate mode is fuzzy. yakui currently streams geometry into a buffer every frame, but caches other things.

Would this change over time?

You can integrate yakui into any kind of application. The only constraint is that you start a DOM, call some functions, then paint it to the screen. There's no framework for managing state or updates with yakui.

AWesome thank you mate :)