You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some of these questions may be straightforward but I've never done in game ui or used imgui, and I'm working on my first rust project, so it's all new to me.
I've been reading through the example code try to get a handle on how things work. I see a lot of these sorts of show calls in the example: .show(ui, |ui| self.painting.ui(ui)); Why take the ui object and also a lambda taking a ui object? I started digging to try and see if the ui just gets passed in later but it looks like child ui's are getting passed in?
I guess more generally if the rendering isn't immediate mode, is each frame building one big call-list/vertex-buffer/etc from scratch, or is it somehow figuring out what has or hasn't changed between frames and only sending stuff to the gpu that's different?
Why is a bunch of the core app state serializable? For example the ExampleApp struct. I noticed state seems to be preserved across refreshes if you only manipulate the Examples window -- but if you open any other window than it resets the whole gui to its original state on refresh -- and there's an every frame call to save_memory, but it looks like ultimately that is is only going to save the Memory struct, so I'm not sure how that would interact with other application state.
The text was updated successfully, but these errors were encountered:
Why take the ui object and also a lambda taking a ui object?
in most cases the lambda is given a different Ui instance, or some setup/teardown is performed on the Ui before calling the lambda
is each frame building one big call-list/vertex-buffer/etc from scratch
yes
Why is a bunch of the core app state serializable?
the web wasm example stores the state in local storage, and the glium example code stores it in a json file. it is just nice to be able to continue where you left off.
Some of these questions may be straightforward but I've never done in game ui or used imgui, and I'm working on my first rust project, so it's all new to me.
I've been reading through the example code try to get a handle on how things work. I see a lot of these sorts of show calls in the example:
.show(ui, |ui| self.painting.ui(ui));
Why take the ui object and also a lambda taking a ui object? I started digging to try and see if the ui just gets passed in later but it looks like child ui's are getting passed in?I guess more generally if the rendering isn't immediate mode, is each frame building one big call-list/vertex-buffer/etc from scratch, or is it somehow figuring out what has or hasn't changed between frames and only sending stuff to the gpu that's different?
Why is a bunch of the core app state serializable? For example the ExampleApp struct. I noticed state seems to be preserved across refreshes if you only manipulate the Examples window -- but if you open any other window than it resets the whole gui to its original state on refresh -- and there's an every frame call to
save_memory
, but it looks like ultimately that is is only going to save theMemory
struct, so I'm not sure how that would interact with other application state.The text was updated successfully, but these errors were encountered: