Beginning of sudoku chapter 7 with SDM loading

This commit is contained in:
2022-11-25 15:37:57 -05:00
parent 8f38a3b271
commit 7d2ac20ce1
7 changed files with 233 additions and 5 deletions

View File

@@ -5,7 +5,7 @@
extern crate glutin_window;
use glutin_window::GlutinWindow;
use opengl_graphics::{GlGraphics, OpenGL};
use opengl_graphics::{Filter, GlGraphics, GlyphCache, OpenGL, TextureSettings};
use piston::event_loop::{EventSettings, Events};
use piston::{EventLoop, RenderEvent, WindowSettings};
@@ -32,6 +32,10 @@ fn main() {
let gameboard_view_settings = GameboardViewSettings::new();
let gameboard_view = GameboardView::new(gameboard_view_settings);
let texture_settings = TextureSettings::new().filter(Filter::Nearest);
let ref mut glyphs = GlyphCache::new("assets/FiraSans-Regular.ttf", (), texture_settings)
.expect("Could not load font");
while let Some(e) = events.next(&mut window) {
gameboard_controller.event(
gameboard_view.settings.position,
@@ -43,7 +47,7 @@ fn main() {
use graphics::clear;
clear([1.0; 4], g);
gameboard_view.draw(&gameboard_controller, &c, g);
gameboard_view.draw(&gameboard_controller, glyphs, &c, g);
})
}
}