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
I‘m a newer to egui, so I tried to follow other's examples. And I found that the function item type of CallbackFn::prepare had been changed. Here's a new parameter of type &mut CommandEncoder and a new return type Vec<wgpu::CommandBuffer>.
I tried to invoke CommandEncoder::finish but failed, because the CommandEncoder in the closure is a mutable reference which can't be moved by CommandEncoder::finish.
I have to steal the ownership from the reference or edit CommandEncoder::finish to make it work.
If it's allowed to call CommandEncoder::finish here, CommandEncoder should be changed to value type I think.
The text was updated successfully, but these errors were encountered:
didn't see this ticket so far, don't think the mechanism has changed there much @ACGNnsj the command encoder you get in is the one that is later on used to record egui render passes, as such you're not allowed to finish it inside of prepare since it is still used later. However, you can create new command encoders (or pass them in), finish those and return the resulting CommandBuffer. These command buffers will be executed prior to the egui command encoder but in the same wgpu::Queue::submit call which can make things quite a bit more efficient.
I‘m a newer to egui, so I tried to follow other's examples. And I found that the function item type of
CallbackFn::prepare
had been changed. Here's a new parameter of type&mut CommandEncoder
and a new return typeVec<wgpu::CommandBuffer>
.I tried to invoke
CommandEncoder::finish
but failed, because theCommandEncoder
in the closure is a mutable reference which can't be moved byCommandEncoder::finish
.I have to steal the ownership from the reference or edit
CommandEncoder::finish
to make it work.If it's allowed to call
CommandEncoder::finish
here,CommandEncoder
should be changed to value type I think.The text was updated successfully, but these errors were encountered: