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 am fairly new to rust programming. Also this is the first time i am trying to use piston. I tried to use the following example code (the code found in here).
extern crate piston_window;
use piston_window::*;
fn main() {
let mut window: PistonWindow =
WindowSettings::new("Hello Piston!", [640, 480])
.exit_on_esc(true).build().unwrap();
while let Some(event) = window.next() {
window.draw_2d(&event, |context, graphics, _device| {
clear([1.0; 4], graphics);
rectangle([1.0, 0.0, 0.0, 1.0], // red
[0.0, 0.0, 100.0, 100.0],
context.transform,
graphics);
});
}
}
But It crashed soon after the window is displayed.
The Error :
Help me to fix it..
The text was updated successfully, but these errors were encountered:
I am fairly new to rust programming. Also this is the first time i am trying to use piston. I tried to use the following example code (the code found in here).
But It crashed soon after the window is displayed.
The Error :
Help me to fix it..
The text was updated successfully, but these errors were encountered: