Make the demo window present method take a &mut self

This commit is contained in:
Alan Jeffrey 2019-04-08 11:16:57 -05:00
parent d090dd459b
commit c26a443b0d
3 changed files with 3 additions and 3 deletions

View File

@ -167,7 +167,7 @@ impl Window for WindowImpl {
Point2DI32::new(0, 0) Point2DI32::new(0, 0)
} }
fn present(&self) {} fn present(&mut self) {}
fn resource_loader(&self) -> &dyn ResourceLoader { fn resource_loader(&self) -> &dyn ResourceLoader {
&RESOURCE_LOADER &RESOURCE_LOADER

View File

@ -22,7 +22,7 @@ pub trait Window {
fn gl_version(&self) -> GLVersion; fn gl_version(&self) -> GLVersion;
fn gl_default_framebuffer(&self) -> GLuint { 0 } fn gl_default_framebuffer(&self) -> GLuint { 0 }
fn mouse_position(&self) -> Point2DI32; fn mouse_position(&self) -> Point2DI32;
fn present(&self); fn present(&mut self);
fn resource_loader(&self) -> &dyn ResourceLoader; fn resource_loader(&self) -> &dyn ResourceLoader;
fn create_user_event_id(&self) -> u32; fn create_user_event_id(&self) -> u32;
fn push_user_event(message_type: u32, message_data: u32); fn push_user_event(message_type: u32, message_data: u32);

View File

@ -78,7 +78,7 @@ impl Window for WindowImpl {
Point2DI32::new(mouse_state.x(), mouse_state.y()) Point2DI32::new(mouse_state.x(), mouse_state.y())
} }
fn present(&self) { fn present(&mut self) {
self.window.gl_swap_window(); self.window.gl_swap_window();
} }