Skip to content

Open window

Anton Kholetsky edited this page Apr 18, 2020 · 1 revision

To create a simple window we need:

  1. Create a new project with cargo new project_name
  2. add miniquad to dependencies
  3. In main.rs:
  • create struct Stage > for what?
  • for Stage implement EventHandler > miniquad::event::EventHandler & diff from EventHandlerFree
  • override update and draw functions whith Context > miniquad::graphics::Context
  • call miniquad::start from main function and pass:
    • miniquad::conf::Conf as first param > link to better explanation
    • closure with miniquad::UserData as second param > better explanation

Clone this wiki locally