-
Rust glium❤️창 띄워서 Rust gui동영상 만들 예정_tutorial Book 있음코딩Coding/한글Rust강의★내가★공부하려고만듬 2022. 6. 26. 23:57728x90
https://github.com/glium/glium/tree/master/book
#[macro_use] extern crate glium; fn main() { use glium::{glutin, Surface}; let mut event_loop = glutin::event_loop::EventLoop::new(); let wb = glutin::window::WindowBuilder::new(); let cb = glutin::ContextBuilder::new(); let display = glium::Display::new(wb, cb, &event_loop).unwrap(); event_loop.run(move |ev, _, control_flow| { let mut target = display.draw(); target.clear_color(0.0, 0.0, 1.0, 1.0); target.finish().unwrap(); let next_frame_time = std::time::Instant::now() + std::time::Duration::from_nanos(16_666_667); *control_flow = glutin::event_loop::ControlFlow::WaitUntil(next_frame_time); match ev { glutin::event::Event::WindowEvent { event, .. } => match event { glutin::event::WindowEvent::CloseRequested => { *control_flow = glutin::event_loop::ControlFlow::Exit; return; } _ => return, }, _ => (), } }); }
반응형'코딩Coding > 한글Rust강의★내가★공부하려고만듬' 카테고리의 다른 글
C++❤️)Concurrencpp Modern concurrency for C++동영상 만들예정 (0) 2022.06.29 C++ Parallel계산으로 코딩해도 시간이 더 걸리는 경우의 문제점 해결 방법 (0) 2022.06.28 zig language tutorial❤️ (0) 2022.06.27 Rust Default❤️Initialize Variables in a Rust Struct (0) 2022.06.27 Rust-windowing❤️macOS깔끔한 창 괜찮음 (0) 2022.06.26 Rust❤️How to use Rayon for parallel calculation of PI (0) 2022.06.26 c# ❤️ pi계산 1억자리까지 vs❤️ rust와 비교 (0) 2022.06.24 C# vs C++ vs Rust 피보나치 계산으로 성능 테스트 (0) 2022.06.24