examples: Do not return bool on update()
Also replaced all ``return false;`` usages with Engine.setShouldClose(true).
This commit is contained in:
parent
40c0659cc9
commit
2d53b8bdfd
10 changed files with 11 additions and 31 deletions
|
|
@ -157,7 +157,7 @@ pub fn init(app: *App, engine: *mach.Engine) !void {
|
|||
|
||||
pub fn deinit(_: *App, _: *mach.Engine) void {}
|
||||
|
||||
pub fn update(app: *App, engine: *mach.Engine) !bool {
|
||||
pub fn update(app: *App, engine: *mach.Engine) !void {
|
||||
const back_buffer_view = engine.swap_chain.?.getCurrentTextureView();
|
||||
const color_attachment = gpu.RenderPassColorAttachment{
|
||||
.view = back_buffer_view,
|
||||
|
|
@ -205,6 +205,4 @@ pub fn update(app: *App, engine: *mach.Engine) !bool {
|
|||
|
||||
engine.swap_chain.?.present();
|
||||
back_buffer_view.release();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue